From 0e5751071d3b5afec4a2ac2286bdde2800420cc8 Mon Sep 17 00:00:00 2001 From: "dpolukhin@chromium.org" Date: Thu, 13 May 2010 18:26:41 +0000 Subject: Make missing/wrong croslib nonfatal error. Mitsuru landed CL http://codereview.chromium.org/2032006 that always creates GoogleAuthenticator if --login_manager switch is enabled. GoogleAuthenticator constructor has check for croslib that fails if croslib version doesn't match or you are debugging login manager on Linux. So it broke previous behavior that missing croslib was not a fatal error and user was able to see error message on login screen (now user can't - only black screen after several Chrome restarts). BUG=none TEST=Run Chrome built for Chrome OS on Linux with --login_manager command line switch, it shouldn't crash with CHECK fail about croslib. Review URL: http://codereview.chromium.org/2082001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47166 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/chromeos/login/login_manager_view.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'chrome/browser/chromeos') diff --git a/chrome/browser/chromeos/login/login_manager_view.cc b/chrome/browser/chromeos/login/login_manager_view.cc index 9394ce3..5cc302e 100644 --- a/chrome/browser/chromeos/login/login_manager_view.cc +++ b/chrome/browser/chromeos/login/login_manager_view.cc @@ -79,10 +79,13 @@ LoginManagerView::LoginManagerView(ScreenObserver* observer) error_id_(-1), ALLOW_THIS_IN_INITIALIZER_LIST(focus_grabber_factory_(this)), focus_delayed_(false), - login_in_process_(false) { + login_in_process_(false), + authenticator_(NULL) { // Create login observer to record time of login when successful. LogLoginSuccessObserver::Get(); - authenticator_ = LoginUtils::Get()->CreateAuthenticator(this); + if (CrosLibrary::Get()->EnsureLoaded()) { + authenticator_ = LoginUtils::Get()->CreateAuthenticator(this); + } } LoginManagerView::~LoginManagerView() { @@ -274,7 +277,7 @@ void LoginManagerView::Login() { sign_in_button_->SetEnabled(false); create_account_link_->SetEnabled(false); // Disallow 0 size username. - if (username_field_->text().empty()) { + if (username_field_->text().empty() || !authenticator_) { // Return true so that processing ends return; } -- cgit v1.1