Download via HTTP only if enterprise policy allows.

In order to rollout HTTP-downloads for AU to stable channel, we want to
be a bit more conservative to preseve the defense in depth we have now
with HTTPS. So, we're introduced a new enterprise policy which should be
explicitly enabled in order for the payloads to be downloaded via HTTP.

This CL adds the support for honoring such a policy in update engine.

BUG=chromium:235562
TEST=New unit tests added, existing ones updated and they all pass.
TEST=Tested on ZGB with and without policy and it works as expected.
Change-Id: I356efbe237b10031161a57c70cb851c521915a76
Reviewed-on: https://gerrit.chromium.org/gerrit/55805
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
Commit-Queue: Jay Srinivasan <jaysri@chromium.org>
diff --git a/payload_state_interface.h b/payload_state_interface.h
index 205cb91..cd49abf 100644
--- a/payload_state_interface.h
+++ b/payload_state_interface.h
@@ -69,8 +69,8 @@
   // Returns the payload attempt number.
   virtual uint32_t GetPayloadAttemptNumber() = 0;
 
-  // Returns the current URL index.
-  virtual uint32_t GetUrlIndex() = 0;
+  // Returns the current URL. Returns an empty string if there's no valid URL.
+  virtual std::string GetCurrentUrl() = 0;
 
   // Returns the current URL's failure count.
   virtual uint32_t GetUrlFailureCount() = 0;