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

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

Issue 7774009: [cros] check for updates in WebUI OOBE can be cancelled in dev builds. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added OnActorDestroyed to UpdateScreen::Delegate. Created 9 years, 4 months 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') | chrome/browser/chromeos/login/update_screen_actor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f1dc23c3ea4ba72de467beb881409cc939aec13c..8e70834adde957e927f5cd3d4ba56b07f64b3e33 100644
--- a/chrome/browser/chromeos/login/update_screen.cc
+++ b/chrome/browser/chromeos/login/update_screen.cc
@@ -77,12 +77,15 @@ UpdateScreen::UpdateScreen(ScreenObserver* screen_observer,
is_shown_(false),
ignore_idle_status_(true),
actor_(actor) {
+ actor_->SetDelegate(this);
GetInstanceSet().insert(this);
}
UpdateScreen::~UpdateScreen() {
CrosLibrary::Get()->GetUpdateLibrary()->RemoveObserver(this);
GetInstanceSet().erase(this);
+ if (actor_)
+ actor_->SetDelegate(NULL);
}
void UpdateScreen::UpdateStatusChanged(UpdateLibrary* library) {
@@ -190,6 +193,7 @@ void UpdateScreen::StartUpdate() {
}
void UpdateScreen::CancelUpdate() {
+ VLOG(1) << "Forced update cancel";
ExitUpdate(REASON_UPDATE_CANCELED);
}
@@ -293,4 +297,9 @@ bool UpdateScreen::HasCriticalUpdate() {
return true;
}
+void UpdateScreen::OnActorDestroyed(UpdateScreenActor* actor) {
+ if (actor_ == actor)
+ actor_ = NULL;
+}
+
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/login/update_screen.h ('k') | chrome/browser/chromeos/login/update_screen_actor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698