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 "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/signin/signin_promo.h" | 8 #include "chrome/browser/signin/signin_promo.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 } | 42 } |
43 | 43 |
44 void LoginUIService::LoginUIClosed(LoginUI* ui) { | 44 void LoginUIService::LoginUIClosed(LoginUI* ui) { |
45 if (current_login_ui() != ui) | 45 if (current_login_ui() != ui) |
46 return; | 46 return; |
47 | 47 |
48 ui_ = NULL; | 48 ui_ = NULL; |
49 FOR_EACH_OBSERVER(Observer, observer_list_, OnLoginUIClosed(ui)); | 49 FOR_EACH_OBSERVER(Observer, observer_list_, OnLoginUIClosed(ui)); |
50 } | 50 } |
51 | 51 |
52 void LoginUIService::SyncConfirmationUIClosed(bool configure_sync_first) { | 52 void LoginUIService::SyncConfirmationUIClosed( |
| 53 SyncConfirmationUIClosedResults results) { |
53 FOR_EACH_OBSERVER( | 54 FOR_EACH_OBSERVER( |
54 Observer, | 55 Observer, |
55 observer_list_, | 56 observer_list_, |
56 OnSyncConfirmationUIClosed(configure_sync_first)); | 57 OnSyncConfirmationUIClosed(results)); |
57 } | 58 } |
58 | 59 |
59 void LoginUIService::UntrustedLoginUIShown() { | 60 void LoginUIService::UntrustedLoginUIShown() { |
60 FOR_EACH_OBSERVER(Observer, observer_list_, OnUntrustedLoginUIShown()); | 61 FOR_EACH_OBSERVER(Observer, observer_list_, OnUntrustedLoginUIShown()); |
61 } | 62 } |
62 | 63 |
63 void LoginUIService::ShowLoginPopup() { | 64 void LoginUIService::ShowLoginPopup() { |
64 #if defined(OS_CHROMEOS) | 65 #if defined(OS_CHROMEOS) |
65 if (chrome::IsRunningInForcedAppMode()) | 66 if (chrome::IsRunningInForcedAppMode()) |
66 InlineLoginDialog::Show(profile_); | 67 InlineLoginDialog::Show(profile_); |
(...skipping 14 matching lines...) Expand all Loading... |
81 last_login_result_ = message; | 82 last_login_result_ = message; |
82 browser->window()->ShowAvatarBubbleFromAvatarButton( | 83 browser->window()->ShowAvatarBubbleFromAvatarButton( |
83 message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN : | 84 message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN : |
84 BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR, | 85 BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR, |
85 signin::ManageAccountsParams()); | 86 signin::ManageAccountsParams()); |
86 } | 87 } |
87 | 88 |
88 const base::string16& LoginUIService::GetLastLoginResult() { | 89 const base::string16& LoginUIService::GetLastLoginResult() { |
89 return last_login_result_; | 90 return last_login_result_; |
90 } | 91 } |
OLD | NEW |