Index: chrome/browser/chromeos/login/update_screen.cc |
diff --git a/chrome/browser/chromeos/login/update_screen.cc b/chrome/browser/chromeos/login/update_screen.cc |
index f3f5ef8e57543becc645f4e57d15c825b8d6de88..49b67d81e3979eee5b990984ccc1c5ec81caa0d1 100644 |
--- a/chrome/browser/chromeos/login/update_screen.cc |
+++ b/chrome/browser/chromeos/login/update_screen.cc |
@@ -68,12 +68,12 @@ void UpdateScreen::UpdateStatusChanged(UpdateLibrary* library) { |
case UPDATE_STATUS_UPDATE_AVAILABLE: |
view()->SetProgress(kBeforeDownloadProgress); |
if (!HasCriticalUpdate()) { |
- VLOG(1) << "Noncritical update available: " |
- << library->status().new_version; |
- ExitUpdate(); |
+ LOG(INFO) << "Noncritical update available: " |
+ << library->status().new_version; |
+ ExitUpdate(false); |
} else { |
- VLOG(1) << "Critical update available: " |
- << library->status().new_version; |
+ LOG(INFO) << "Critical update available: " |
+ << library->status().new_version; |
} |
break; |
case UPDATE_STATUS_DOWNLOADING: |
@@ -83,12 +83,12 @@ void UpdateScreen::UpdateStatusChanged(UpdateLibrary* library) { |
// we need to is update critical on first downloading notification. |
is_downloading_update_ = true; |
if (!HasCriticalUpdate()) { |
- VLOG(1) << "Non-critical update available: " |
- << library->status().new_version; |
- ExitUpdate(); |
+ LOG(INFO) << "Non-critical update available: " |
+ << library->status().new_version; |
+ ExitUpdate(false); |
} else { |
- VLOG(1) << "Critical update available: " |
- << library->status().new_version; |
+ LOG(INFO) << "Critical update available: " |
+ << library->status().new_version; |
} |
} |
view()->ShowCurtain(false); |
@@ -115,13 +115,13 @@ void UpdateScreen::UpdateStatusChanged(UpdateLibrary* library) { |
this, |
&UpdateScreen::OnWaitForRebootTimeElapsed); |
} else { |
- ExitUpdate(); |
+ ExitUpdate(false); |
} |
break; |
case UPDATE_STATUS_IDLE: |
case UPDATE_STATUS_ERROR: |
case UPDATE_STATUS_REPORTING_ERROR_EVENT: |
- ExitUpdate(); |
+ ExitUpdate(false); |
break; |
default: |
NOTREACHED(); |
@@ -153,7 +153,7 @@ void UpdateScreen::StartUpdate() { |
CrosLibrary::Get()->GetUpdateLibrary()->AddObserver(this); |
VLOG(1) << "Initiate update check"; |
if (!CrosLibrary::Get()->GetUpdateLibrary()->CheckForUpdate()) { |
- ExitUpdate(); |
+ ExitUpdate(true); |
} |
} |
} |
@@ -162,15 +162,21 @@ void UpdateScreen::CancelUpdate() { |
// 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(); |
@@ -179,6 +185,8 @@ void UpdateScreen::ExitUpdate() { |
case UPDATE_STATUS_UPDATE_AVAILABLE: |
case UPDATE_STATUS_UPDATED_NEED_REBOOT: |
case UPDATE_STATUS_DOWNLOADING: |
+ case UPDATE_STATUS_FINALIZING: |
+ case UPDATE_STATUS_VERIFYING: |
DCHECK(!HasCriticalUpdate()); |
// Noncritical update, just exit screen as if there is no update. |
// no break |