Allow HTTP urls when device policy doesn't specify.

BUG=chromium:277835
TEST=Unittest

Change-Id: I638248dcbdbdaf48e38b79638b2348aa6c1400fb
Reviewed-on: https://gerrit.chromium.org/gerrit/66732
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
diff --git a/payload_state.cc b/payload_state.cc
index 1d7e0fe..5fc35cf 100644
--- a/payload_state.cc
+++ b/payload_state.cc
@@ -1065,12 +1065,11 @@
 }
 
 void PayloadState::ComputeCandidateUrls() {
-  bool http_url_ok = false;
+  bool http_url_ok = true;
 
   if (system_state_->IsOfficialBuild()) {
     const policy::DevicePolicy* policy = system_state_->device_policy();
-    if (!(policy && policy->GetHttpDownloadsEnabled(&http_url_ok) &&
-          http_url_ok))
+    if (policy && policy->GetHttpDownloadsEnabled(&http_url_ok) && !http_url_ok)
       LOG(INFO) << "Downloads via HTTP Url are not enabled by device policy";
   } else {
     LOG(INFO) << "Allowing HTTP downloads for unofficial builds";