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 "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/task/cancelable_task_tracker.h" |
15 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/profiles/profile_metrics.h" | 17 #include "chrome/browser/profiles/profile_metrics.h" |
| 18 #include "chrome/browser/profiles/profile_statistics.h" |
17 #include "chrome/browser/ui/host_desktop.h" | 19 #include "chrome/browser/ui/host_desktop.h" |
18 #include "components/proximity_auth/screenlock_bridge.h" | 20 #include "components/proximity_auth/screenlock_bridge.h" |
19 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
20 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
21 #include "content/public/browser/web_ui_message_handler.h" | 23 #include "content/public/browser/web_ui_message_handler.h" |
22 #include "google_apis/gaia/gaia_auth_consumer.h" | 24 #include "google_apis/gaia/gaia_auth_consumer.h" |
23 #include "google_apis/gaia/gaia_oauth_client.h" | 25 #include "google_apis/gaia/gaia_oauth_client.h" |
24 | 26 |
25 class GaiaAuthFetcher; | 27 class GaiaAuthFetcher; |
26 | 28 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 class ProfileUpdateObserver; | 77 class ProfileUpdateObserver; |
76 | 78 |
77 void HandleInitialize(const base::ListValue* args); | 79 void HandleInitialize(const base::ListValue* args); |
78 void HandleAddUser(const base::ListValue* args); | 80 void HandleAddUser(const base::ListValue* args); |
79 void HandleAuthenticatedLaunchUser(const base::ListValue* args); | 81 void HandleAuthenticatedLaunchUser(const base::ListValue* args); |
80 void HandleLaunchGuest(const base::ListValue* args); | 82 void HandleLaunchGuest(const base::ListValue* args); |
81 void HandleLaunchUser(const base::ListValue* args); | 83 void HandleLaunchUser(const base::ListValue* args); |
82 void HandleRemoveUser(const base::ListValue* args); | 84 void HandleRemoveUser(const base::ListValue* args); |
83 void HandleAttemptUnlock(const base::ListValue* args); | 85 void HandleAttemptUnlock(const base::ListValue* args); |
84 void HandleHardlockUserPod(const base::ListValue* args); | 86 void HandleHardlockUserPod(const base::ListValue* args); |
| 87 void HandleRemoveUserWarningLoadStats(const base::ListValue* args); |
| 88 |
| 89 // Callback function used by HandleRemoveUserWarningLoadStats |
| 90 void UserManagerScreenHandler::RemoveUserDialogLoadStatsCallback( |
| 91 const base::FilePath* profile_path, |
| 92 profiles::ProfileStatisticsValues result); |
85 | 93 |
86 // Handle GAIA auth results. | 94 // Handle GAIA auth results. |
87 void OnGetTokenInfoResponse( | 95 void OnGetTokenInfoResponse( |
88 scoped_ptr<base::DictionaryValue> token_info) override; | 96 scoped_ptr<base::DictionaryValue> token_info) override; |
89 void OnOAuthError() override; | 97 void OnOAuthError() override; |
90 void OnNetworkError(int response_code) override; | 98 void OnNetworkError(int response_code) override; |
91 // ClientLogin is deprecated | 99 // ClientLogin is deprecated |
92 void OnClientLoginSuccess(const ClientLoginResult& result) override; | 100 void OnClientLoginSuccess(const ClientLoginResult& result) override; |
93 void OnClientLoginFailure(const GoogleServiceAuthError& error) override; | 101 void OnClientLoginFailure(const GoogleServiceAuthError& error) override; |
94 | 102 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 137 |
130 typedef std::map<std::string, | 138 typedef std::map<std::string, |
131 proximity_auth::ScreenlockBridge::LockHandler::AuthType> | 139 proximity_auth::ScreenlockBridge::LockHandler::AuthType> |
132 UserAuthTypeMap; | 140 UserAuthTypeMap; |
133 UserAuthTypeMap user_auth_type_map_; | 141 UserAuthTypeMap user_auth_type_map_; |
134 | 142 |
135 content::NotificationRegistrar registrar_; | 143 content::NotificationRegistrar registrar_; |
136 | 144 |
137 base::WeakPtrFactory<UserManagerScreenHandler> weak_ptr_factory_; | 145 base::WeakPtrFactory<UserManagerScreenHandler> weak_ptr_factory_; |
138 | 146 |
| 147 // The CalcelableTaskTracker is currently used by GetProfileStatistics |
| 148 base::CancelableTaskTracker tracker; |
| 149 |
139 DISALLOW_COPY_AND_ASSIGN(UserManagerScreenHandler); | 150 DISALLOW_COPY_AND_ASSIGN(UserManagerScreenHandler); |
140 }; | 151 }; |
141 | 152 |
142 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ | 153 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ |
OLD | NEW |