| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/signin/login_ui_service.h" | 5 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/signin/signin_promo.h" | 9 #include "chrome/browser/signin/signin_promo.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 | 39 |
| 40 void LoginUIService::LoginUIClosed(LoginUI* ui) { | 40 void LoginUIService::LoginUIClosed(LoginUI* ui) { |
| 41 if (current_login_ui() != ui) | 41 if (current_login_ui() != ui) |
| 42 return; | 42 return; |
| 43 | 43 |
| 44 ui_ = NULL; | 44 ui_ = NULL; |
| 45 FOR_EACH_OBSERVER(Observer, observer_list_, OnLoginUIClosed(ui)); | 45 FOR_EACH_OBSERVER(Observer, observer_list_, OnLoginUIClosed(ui)); |
| 46 } | 46 } |
| 47 | 47 |
| 48 void LoginUIService::SyncConfirmationUIClosed(bool configure_sync_first) { | 48 void LoginUIService::SyncConfirmationUIClosed( |
| 49 SyncConfirmationUIClosedResults results) { |
| 49 FOR_EACH_OBSERVER( | 50 FOR_EACH_OBSERVER( |
| 50 Observer, | 51 Observer, |
| 51 observer_list_, | 52 observer_list_, |
| 52 OnSyncConfirmationUIClosed(configure_sync_first)); | 53 OnSyncConfirmationUIClosed(results)); |
| 53 } | 54 } |
| 54 | 55 |
| 55 void LoginUIService::UntrustedLoginUIShown() { | 56 void LoginUIService::UntrustedLoginUIShown() { |
| 56 FOR_EACH_OBSERVER(Observer, observer_list_, OnUntrustedLoginUIShown()); | 57 FOR_EACH_OBSERVER(Observer, observer_list_, OnUntrustedLoginUIShown()); |
| 57 } | 58 } |
| 58 | 59 |
| 59 void LoginUIService::ShowLoginPopup() { | 60 void LoginUIService::ShowLoginPopup() { |
| 60 #if defined(OS_CHROMEOS) | 61 #if defined(OS_CHROMEOS) |
| 61 NOTREACHED(); | 62 NOTREACHED(); |
| 62 #else | 63 #else |
| (...skipping 15 matching lines...) Expand all Loading... |
| 78 browser->window()->ShowAvatarBubbleFromAvatarButton( | 79 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 79 message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN | 80 message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN |
| 80 : BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR, | 81 : BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR, |
| 81 signin::ManageAccountsParams(), | 82 signin::ManageAccountsParams(), |
| 82 signin_metrics::AccessPoint::ACCESS_POINT_EXTENSIONS); | 83 signin_metrics::AccessPoint::ACCESS_POINT_EXTENSIONS); |
| 83 } | 84 } |
| 84 | 85 |
| 85 const base::string16& LoginUIService::GetLastLoginResult() { | 86 const base::string16& LoginUIService::GetLastLoginResult() { |
| 86 return last_login_result_; | 87 return last_login_result_; |
| 87 } | 88 } |
| OLD | NEW |