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

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

Issue 8395042: [cros,de-hack] Get rid of singleton for the WebUILoginScreen. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comment nit Created 9 years, 2 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
Index: chrome/browser/chromeos/login/existing_user_controller.cc
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index 94c724b9ef34183fa31d5b777cd7b830306fb2d5..84630bfb4c6b32b4e780327c083b8376d60abed7 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -80,6 +80,7 @@ ExistingUserController* ExistingUserController::current_controller_ = NULL;
ExistingUserController::ExistingUserController(LoginDisplayHost* host)
: login_status_consumer_(NULL),
host_(host),
+ login_display_(host_->CreateLoginDisplay(this)),
num_login_attempts_(0),
user_settings_(new UserCrosSettingsProvider),
weak_factory_(this),
@@ -87,8 +88,6 @@ ExistingUserController::ExistingUserController(LoginDisplayHost* host)
DCHECK(current_controller_ == NULL);
current_controller_ = this;
- login_display_ = host_->CreateLoginDisplay(this);
-
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
content::NotificationService::AllSources());
@@ -144,9 +143,7 @@ ExistingUserController::~ExistingUserController() {
} else {
NOTREACHED() << "More than one controller are alive.";
}
- DCHECK(login_display_ != NULL);
- login_display_->Destroy();
- login_display_ = NULL;
+ DCHECK(login_display_.get());
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698