| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/profiles/profile_metrics.h" | 15 #include "chrome/browser/profiles/profile_metrics.h" |
| 15 #include "chrome/browser/signin/screenlock_bridge.h" | 16 #include "chrome/browser/signin/screenlock_bridge.h" |
| 16 #include "chrome/browser/ui/host_desktop.h" | 17 #include "chrome/browser/ui/host_desktop.h" |
| 17 #include "content/public/browser/web_ui_message_handler.h" | 18 #include "content/public/browser/web_ui_message_handler.h" |
| 18 #include "google_apis/gaia/gaia_auth_consumer.h" | 19 #include "google_apis/gaia/gaia_auth_consumer.h" |
| 19 | 20 |
| 20 class GaiaAuthFetcher; | 21 class GaiaAuthFetcher; |
| 21 | 22 |
| 22 namespace base { | 23 namespace base { |
| 23 class DictionaryValue; | 24 class DictionaryValue; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 virtual void OnClientLoginFailure(const GoogleServiceAuthError& error) | 71 virtual void OnClientLoginFailure(const GoogleServiceAuthError& error) |
| 71 OVERRIDE; | 72 OVERRIDE; |
| 72 | 73 |
| 73 // Sends user list to account chooser. | 74 // Sends user list to account chooser. |
| 74 void SendUserList(); | 75 void SendUserList(); |
| 75 | 76 |
| 76 // Pass success/failure information back to the web page. | 77 // Pass success/failure information back to the web page. |
| 77 void ReportAuthenticationResult(bool success, | 78 void ReportAuthenticationResult(bool success, |
| 78 ProfileMetrics::ProfileAuth metric); | 79 ProfileMetrics::ProfileAuth metric); |
| 79 | 80 |
| 81 // Perform cleanup once the profile and browser are open. |
| 82 void OnSwitchToProfileComplete(Profile* profile, |
| 83 Profile::CreateStatus profile_create_status); |
| 84 |
| 80 // Observes the ProfileInfoCache and gets notified when a profile has been | 85 // Observes the ProfileInfoCache and gets notified when a profile has been |
| 81 // modified, so that the displayed user pods can be updated. | 86 // modified, so that the displayed user pods can be updated. |
| 82 scoped_ptr<ProfileUpdateObserver> profileInfoCacheObserver_; | 87 scoped_ptr<ProfileUpdateObserver> profileInfoCacheObserver_; |
| 83 | 88 |
| 84 // The host desktop type this user manager belongs to. | 89 // The host desktop type this user manager belongs to. |
| 85 chrome::HostDesktopType desktop_type_; | 90 chrome::HostDesktopType desktop_type_; |
| 86 | 91 |
| 87 // Authenticator used when local-auth fails. | 92 // Authenticator used when local-auth fails. |
| 88 scoped_ptr<GaiaAuthFetcher> client_login_; | 93 scoped_ptr<GaiaAuthFetcher> client_login_; |
| 89 | 94 |
| 90 // The index of the profile currently being authenticated. | 95 // The index of the profile currently being authenticated. |
| 91 size_t authenticating_profile_index_; | 96 size_t authenticating_profile_index_; |
| 92 | 97 |
| 93 // Login password, held during on-line auth for saving later if correct. | 98 // Login password, held during on-line auth for saving later if correct. |
| 94 std::string password_attempt_; | 99 std::string password_attempt_; |
| 95 | 100 |
| 101 // URL hash, used to key post-profile actions if present. |
| 102 base::string16 url_hash_; |
| 103 |
| 96 typedef std::map<std::string, ScreenlockBridge::LockHandler::AuthType> | 104 typedef std::map<std::string, ScreenlockBridge::LockHandler::AuthType> |
| 97 UserAuthTypeMap; | 105 UserAuthTypeMap; |
| 98 UserAuthTypeMap user_auth_type_map_; | 106 UserAuthTypeMap user_auth_type_map_; |
| 99 | 107 |
| 100 DISALLOW_COPY_AND_ASSIGN(UserManagerScreenHandler); | 108 DISALLOW_COPY_AND_ASSIGN(UserManagerScreenHandler); |
| 101 }; | 109 }; |
| 102 | 110 |
| 103 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ | 111 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ |
| OLD | NEW |