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 <[email protected]>
Tested-by: Jay Srinivasan <[email protected]>
Commit-Queue: Jay Srinivasan <[email protected]>
diff --git a/mock_payload_state.h b/mock_payload_state.h
index 65d99da..6513a83 100644
--- a/mock_payload_state.h
+++ b/mock_payload_state.h
@@ -30,7 +30,7 @@
   // Getters.
   MOCK_METHOD0(GetResponseSignature, std::string());
   MOCK_METHOD0(GetPayloadAttemptNumber, uint32_t());
-  MOCK_METHOD0(GetUrlIndex, uint32_t());
+  MOCK_METHOD0(GetCurrentUrl, std::string());
   MOCK_METHOD0(GetUrlFailureCount, uint32_t());
   MOCK_METHOD0(GetUrlSwitchCount, uint32_t());
   MOCK_METHOD0(GetBackoffExpiryTime, base::Time());