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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "base/prefs/pref_change_registrar.h" | 11 #include "base/prefs/pref_change_registrar.h" |
| 12 #include "base/task/cancelable_task_tracker.h" |
12 #include "chrome/browser/profiles/profile_info_cache_observer.h" | 13 #include "chrome/browser/profiles/profile_info_cache_observer.h" |
| 14 #include "chrome/browser/profiles/profile_statistics.h" |
13 #include "chrome/browser/ui/webui/options/options_ui.h" | 15 #include "chrome/browser/ui/webui/options/options_ui.h" |
14 #include "components/sync_driver/sync_service_observer.h" | 16 #include "components/sync_driver/sync_service_observer.h" |
15 | 17 |
16 namespace base { | 18 namespace base { |
17 class StringValue; | 19 class StringValue; |
18 } | 20 } |
19 | 21 |
20 namespace options { | 22 namespace options { |
21 | 23 |
22 // Chrome personal stuff profiles manage overlay UI handler. | 24 // Chrome personal stuff profiles manage overlay UI handler. |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 127 |
126 // Callback for the "removeProfileShortcut" message, which is called when | 128 // Callback for the "removeProfileShortcut" message, which is called when |
127 // editing an existing profile and the user clicks the "Remove desktop | 129 // editing an existing profile and the user clicks the "Remove desktop |
128 // shortcut" button. Removes the desktop shortcut for the profile. | 130 // shortcut" button. Removes the desktop shortcut for the profile. |
129 void RemoveProfileShortcut(const base::ListValue* args); | 131 void RemoveProfileShortcut(const base::ListValue* args); |
130 | 132 |
131 // Callback for the "refreshGaiaPicture" message, which is called when the | 133 // Callback for the "refreshGaiaPicture" message, which is called when the |
132 // user is editing an existing profile. | 134 // user is editing an existing profile. |
133 void RefreshGaiaPicture(const base::ListValue* args); | 135 void RefreshGaiaPicture(const base::ListValue* args); |
134 | 136 |
| 137 // The CalcelableTaskTracker is currently used by GetProfileStatistics |
| 138 base::CancelableTaskTracker tracker; |
| 139 |
| 140 // Load extra statistics for the "delete user" dialog, which is called when |
| 141 // the user press the delete profile button. This action is done async. |
| 142 void DeleteUserDialogLoadStats(const base::ListValue* args); |
| 143 |
| 144 // Callback from profiles::GetProfileStats. Send information back to the form. |
| 145 void DeleteUserDialogLoadStatsCallback(const base::FilePath* profile_path, |
| 146 profiles::ProfileStatisticsValues result); |
| 147 |
135 // URL for the current profile's GAIA picture. | 148 // URL for the current profile's GAIA picture. |
136 std::string gaia_picture_url_; | 149 std::string gaia_picture_url_; |
137 | 150 |
138 // Used to observe the preference that allows creating supervised users, which | 151 // Used to observe the preference that allows creating supervised users, which |
139 // can be changed by policy. | 152 // can be changed by policy. |
140 PrefChangeRegistrar pref_change_registrar_; | 153 PrefChangeRegistrar pref_change_registrar_; |
141 | 154 |
142 // For generating weak pointers to itself for callbacks. | 155 // For generating weak pointers to itself for callbacks. |
143 base::WeakPtrFactory<ManageProfileHandler> weak_factory_; | 156 base::WeakPtrFactory<ManageProfileHandler> weak_factory_; |
144 | 157 |
145 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler); | 158 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler); |
146 }; | 159 }; |
147 | 160 |
148 } // namespace options | 161 } // namespace options |
149 | 162 |
150 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ | 163 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ |
OLD | NEW |