summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/fake_update_engine_client.cc
diff options
context:
space:
mode:
authorygorshenin <ygorshenin@chromium.org>2014-09-25 04:40:48 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-25 11:40:59 +0000
commit84a24d2929796a717aef73ec7d85a87e09cd251d (patch)
treec4ff33668a3fcfe4394eadbaeba33f8331f3ce0b /chromeos/dbus/fake_update_engine_client.cc
parent5affd816675a57698f20260c6af0a894d7d4e9c8 (diff)
downloadchromium_src-84a24d2929796a717aef73ec7d85a87e09cd251d.zip
chromium_src-84a24d2929796a717aef73ec7d85a87e09cd251d.tar.gz
chromium_src-84a24d2929796a717aef73ec7d85a87e09cd251d.tar.bz2
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}
Diffstat (limited to 'chromeos/dbus/fake_update_engine_client.cc')
-rw-r--r--chromeos/dbus/fake_update_engine_client.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chromeos/dbus/fake_update_engine_client.cc b/chromeos/dbus/fake_update_engine_client.cc
index e0c46a4..53314e2 100644
--- a/chromeos/dbus/fake_update_engine_client.cc
+++ b/chromeos/dbus/fake_update_engine_client.cc
@@ -10,6 +10,7 @@ FakeUpdateEngineClient::FakeUpdateEngineClient()
: update_check_result_(UpdateEngineClient::UPDATE_RESULT_SUCCESS),
can_rollback_stub_result_(false),
reboot_after_update_call_count_(0),
+ request_update_check_call_count_(0),
rollback_call_count_(0),
can_rollback_call_count_(0) {
}
@@ -29,11 +30,12 @@ void FakeUpdateEngineClient::RemoveObserver(Observer* observer) {
}
bool FakeUpdateEngineClient::HasObserver(Observer* observer) {
- return false;
+ return observers_.HasObserver(observer);
}
void FakeUpdateEngineClient::RequestUpdateCheck(
const UpdateCheckCallback& callback) {
+ request_update_check_call_count_++;
callback.Run(update_check_result_);
}