Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: chrome/browser/chromeos/login/update_screen.cc

Issue 5291010: [cros] Make sure that update screen will be skipped when shortcut is pressed. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552d/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/update_screen.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/update_screen.cc
===================================================================
--- chrome/browser/chromeos/login/update_screen.cc (revision 67705)
+++ chrome/browser/chromeos/login/update_screen.cc (working copy)
@@ -92,7 +92,7 @@
case UPDATE_STATUS_IDLE:
case UPDATE_STATUS_ERROR:
case UPDATE_STATUS_REPORTING_ERROR_EVENT:
- ExitUpdate();
+ ExitUpdate(false);
break;
default:
NOTREACHED();
@@ -123,7 +123,7 @@
CrosLibrary::Get()->GetUpdateLibrary()->AddObserver(this);
LOG(INFO) << "Checking for update";
if (!CrosLibrary::Get()->GetUpdateLibrary()->CheckForUpdate()) {
- ExitUpdate();
+ ExitUpdate(true);
}
}
}
@@ -132,17 +132,23 @@
// Screen has longer lifetime than it's view.
// View is deleted after wizard proceeds to the next screen.
if (view())
- ExitUpdate();
+ ExitUpdate(true);
}
-void UpdateScreen::ExitUpdate() {
+void UpdateScreen::ExitUpdate(bool forced) {
maximal_curtain_time_timer_.Stop();
ScreenObserver* observer = delegate()->GetObserver(this);
if (!CrosLibrary::Get()->EnsureLoaded()) {
observer->OnExit(ScreenObserver::UPDATE_ERROR_CHECKING_FOR_UPDATE);
+ return;
}
+ if (forced) {
+ observer->OnExit(ScreenObserver::UPDATE_NOUPDATE);
+ return;
+ }
+
UpdateLibrary* update_library = CrosLibrary::Get()->GetUpdateLibrary();
update_library->RemoveObserver(this);
switch (update_library->status().status) {
« no previous file with comments | « chrome/browser/chromeos/login/update_screen.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698