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/omaha_request_action.cc b/omaha_request_action.cc
index f2c5c6b..c28e0d6 100644
--- a/omaha_request_action.cc
+++ b/omaha_request_action.cc
@@ -544,7 +544,6 @@
   output_object->payload_urls.clear();
   for (int i = 0; i < nodeset->nodeNr; i++) {
     xmlNode* url_node = nodeset->nodeTab[i];
-
     const string codebase(XmlGetProperty(url_node, "codebase"));
     if (codebase.empty()) {
       LOG(ERROR) << "Omaha Response URL has empty codebase";
@@ -593,10 +592,8 @@
   // Append the package name to each URL in our list so that we don't
   // propagate the urlBase vs packageName distinctions beyond this point.
   // From now on, we only need to use payload_urls.
-  for (size_t i = 0; i < output_object->payload_urls.size(); i++) {
+  for (size_t i = 0; i < output_object->payload_urls.size(); i++)
     output_object->payload_urls[i] += package_name;
-    LOG(INFO) << "Url" << i << ": " << output_object->payload_urls[i];
-  }
 
   // Parse the payload size.
   off_t size = ParseInt(XmlGetProperty(package_node, "size"));