Fix update_disabled flag to be set to false when there's no policy.
My previous check-in introduced an uninitialized variable which
may cause some random AU failures because of the update_disbled
flag being initialized to true based on the contents of the stack.
This CL fixes it by always setting it to false.
BUG=chromium:222161
TEST=Unit Tests Pass, work as expected on my ZGB.
Change-Id: I80fce1db566f6cea0ea80370c4a90dc538215316
Reviewed-on: https://gerrit.chromium.org/gerrit/45941
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
diff --git a/update_attempter.cc b/update_attempter.cc
index 2aee0be..c287fe3 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -205,7 +205,7 @@
const policy::DevicePolicy& device_policy =
policy_provider_->GetDevicePolicy();
- bool update_disabled;
+ bool update_disabled = false;
device_policy.GetUpdateDisabled(&update_disabled);
omaha_request_params_->set_update_disabled(update_disabled);