Fixed channel switch when user decides to switch to another channel in
commit84a24d2929796a717aef73ec7d85a87e09cd251d
authorygorshenin <ygorshenin@chromium.org>
Thu, 25 Sep 2014 11:40:48 +0000 (25 04:40 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 25 Sep 2014 11:40:59 +0000 (25 11:40 +0000)
treec4ff33668a3fcfe4394eadbaeba33f8331f3ce0b
parent5affd816675a57698f20260c6af0a894d7d4e9c8
Fixed channel switch when user decides to switch to another channel in
he middle of current channel transition.

For example:
1. User is currently on the beta channel and decides to switch to the dev channel.
2. In the middle of the switch the user decides to switch to the stable channel
   instead of currently downloading dev.

But update engine moves to UPDATE_STATUS_REPORTING_ERROR_EVENT because
target channel isn't equal to downloading channel, so request to start
downloading of stable channel fails. Almost immediately update engine moves
to UPDATE_STATUS_IDLE, but user needs to reload chrome://help page to initiate
update check. Current changelist handles the issue and implements automatic
update checks when update engine is idle.

BUG=311162
TEST=unit_tests:VersionUpdaterCrosTest.*

Review URL: https://codereview.chromium.org/578293002

Cr-Commit-Position: refs/heads/master@{#296693}
chrome/browser/ui/webui/help/version_updater_chromeos.cc
chrome/browser/ui/webui/help/version_updater_chromeos.h
chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc [new file with mode: 0644]
chrome/chrome_tests_unit.gypi
chromeos/dbus/fake_update_engine_client.cc
chromeos/dbus/fake_update_engine_client.h