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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 8479042: UI polish for certificate viewer (Closed) Base URL: /usr/local/google/home/bshe/NoTouchChromium/../TouchChromium/src/@trunk
Patch Set: Remove body margins of two internal pages(due to the changes in tabs.css file). Created 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/existing_user_controller.h" 5 #include "chrome/browser/chromeos/login/existing_user_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/browser/chromeos/dbus/session_manager_client.h" 23 #include "chrome/browser/chromeos/dbus/session_manager_client.h"
24 #include "chrome/browser/chromeos/login/helper.h" 24 #include "chrome/browser/chromeos/login/helper.h"
25 #include "chrome/browser/chromeos/login/login_display_host.h" 25 #include "chrome/browser/chromeos/login/login_display_host.h"
26 #include "chrome/browser/chromeos/login/user_manager.h" 26 #include "chrome/browser/chromeos/login/user_manager.h"
27 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" 27 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h"
28 #include "chrome/browser/chromeos/login/wizard_controller.h" 28 #include "chrome/browser/chromeos/login/wizard_controller.h"
29 #include "chrome/browser/chromeos/user_cros_settings_provider.h" 29 #include "chrome/browser/chromeos/user_cros_settings_provider.h"
30 #include "chrome/browser/google/google_util.h" 30 #include "chrome/browser/google/google_util.h"
31 #include "chrome/browser/prefs/pref_service.h" 31 #include "chrome/browser/prefs/pref_service.h"
32 #include "chrome/browser/profiles/profile_manager.h" 32 #include "chrome/browser/profiles/profile_manager.h"
33 #include "chrome/browser/ui/dialog_style.h"
33 #include "chrome/browser/ui/views/window.h" 34 #include "chrome/browser/ui/views/window.h"
34 #include "chrome/common/chrome_notification_types.h" 35 #include "chrome/common/chrome_notification_types.h"
35 #include "chrome/common/chrome_switches.h" 36 #include "chrome/common/chrome_switches.h"
36 #include "chrome/common/net/gaia/google_service_auth_error.h" 37 #include "chrome/common/net/gaia/google_service_auth_error.h"
37 #include "chrome/common/pref_names.h" 38 #include "chrome/common/pref_names.h"
38 #include "content/public/browser/notification_service.h" 39 #include "content/public/browser/notification_service.h"
39 #include "content/public/browser/notification_types.h" 40 #include "content/public/browser/notification_types.h"
40 #include "grit/generated_resources.h" 41 #include "grit/generated_resources.h"
41 #include "ui/base/l10n/l10n_util.h" 42 #include "ui/base/l10n/l10n_util.h"
42 #include "views/widget/widget.h" 43 #include "views/widget/widget.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // Network is connected. 302 // Network is connected.
302 const Network* active_network = network->active_network(); 303 const Network* active_network = network->active_network();
303 if (failure.reason() == LoginFailure::NETWORK_AUTH_FAILED && 304 if (failure.reason() == LoginFailure::NETWORK_AUTH_FAILED &&
304 failure.error().state() == GoogleServiceAuthError::CAPTCHA_REQUIRED) { 305 failure.error().state() == GoogleServiceAuthError::CAPTCHA_REQUIRED) {
305 if (!failure.error().captcha().image_url.is_empty()) { 306 if (!failure.error().captcha().image_url.is_empty()) {
306 CaptchaView* view = 307 CaptchaView* view =
307 new CaptchaView(failure.error().captcha().image_url, false); 308 new CaptchaView(failure.error().captcha().image_url, false);
308 view->Init(); 309 view->Init();
309 view->set_delegate(this); 310 view->set_delegate(this);
310 views::Widget* window = browser::CreateViewsWindow( 311 views::Widget* window = browser::CreateViewsWindow(
311 GetNativeWindow(), view); 312 GetNativeWindow(), view, STYLE_GENERIC);
312 window->SetAlwaysOnTop(true); 313 window->SetAlwaysOnTop(true);
313 window->Show(); 314 window->Show();
314 } else { 315 } else {
315 LOG(WARNING) << "No captcha image url was found?"; 316 LOG(WARNING) << "No captcha image url was found?";
316 ShowError(IDS_LOGIN_ERROR_AUTHENTICATING, error); 317 ShowError(IDS_LOGIN_ERROR_AUTHENTICATING, error);
317 } 318 }
318 } else if (failure.reason() == LoginFailure::NETWORK_AUTH_FAILED && 319 } else if (failure.reason() == LoginFailure::NETWORK_AUTH_FAILED &&
319 failure.error().state() == 320 failure.error().state() ==
320 GoogleServiceAuthError::HOSTED_NOT_ALLOWED) { 321 GoogleServiceAuthError::HOSTED_NOT_ALLOWED) {
321 ShowError(IDS_LOGIN_ERROR_AUTHENTICATING_HOSTED, error); 322 ShowError(IDS_LOGIN_ERROR_AUTHENTICATING_HOSTED, error);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 // Another attempt will be invoked after verification completion. 482 // Another attempt will be invoked after verification completion.
482 return; 483 return;
483 } 484 }
484 485
485 // Passing 'false' here enables "full sync" mode in the dialog, 486 // Passing 'false' here enables "full sync" mode in the dialog,
486 // which disables the requirement for the old owner password, 487 // which disables the requirement for the old owner password,
487 // allowing us to recover from a lost owner password/homedir. 488 // allowing us to recover from a lost owner password/homedir.
488 // TODO(gspencer): We shouldn't have to erase stateful data when 489 // TODO(gspencer): We shouldn't have to erase stateful data when
489 // doing this. See http://crosbug.com/9115 http://crosbug.com/7792 490 // doing this. See http://crosbug.com/9115 http://crosbug.com/7792
490 PasswordChangedView* view = new PasswordChangedView(this, false); 491 PasswordChangedView* view = new PasswordChangedView(this, false);
491 views::Widget* window = browser::CreateViewsWindow(GetNativeWindow(), view); 492 views::Widget* window = browser::CreateViewsWindow(GetNativeWindow(), view,
493 STYLE_GENERIC);
flackr 2011/11/21 20:43:31 One line per argument once you have to wrap.
bshe 2011/11/22 16:26:24 Done.
492 window->SetAlwaysOnTop(true); 494 window->SetAlwaysOnTop(true);
493 window->Show(); 495 window->Show();
494 496
495 if (login_status_consumer_) 497 if (login_status_consumer_)
496 login_status_consumer_->OnPasswordChangeDetected(credentials); 498 login_status_consumer_->OnPasswordChangeDetected(credentials);
497 } 499 }
498 500
499 void ExistingUserController::WhiteListCheckFailed(const std::string& email) { 501 void ExistingUserController::WhiteListCheckFailed(const std::string& email) {
500 ShowError(IDS_LOGIN_ERROR_WHITELIST, email); 502 ShowError(IDS_LOGIN_ERROR_WHITELIST, email);
501 503
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 CryptohomeLibrary* cryptohomed = CrosLibrary::Get()->GetCryptohomeLibrary(); 591 CryptohomeLibrary* cryptohomed = CrosLibrary::Get()->GetCryptohomeLibrary();
590 cryptohomed->AsyncSetOwnerUser( 592 cryptohomed->AsyncSetOwnerUser(
591 UserCrosSettingsProvider::cached_owner(), NULL); 593 UserCrosSettingsProvider::cached_owner(), NULL);
592 594
593 // Do not invoke AsyncDoAutomaticFreeDiskSpaceControl(NULL) here 595 // Do not invoke AsyncDoAutomaticFreeDiskSpaceControl(NULL) here
594 // so it does not delay the following mount. Cleanup will be 596 // so it does not delay the following mount. Cleanup will be
595 // started in Cryptohomed by timer. 597 // started in Cryptohomed by timer.
596 } 598 }
597 599
598 } // namespace chromeos 600 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698