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_OPTIONS_CREATE_PROFILE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CREATE_PROFILE_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CREATE_PROFILE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CREATE_PROFILE_HANDLER_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/profiles/profile_window.h" | 11 #include "chrome/browser/profiles/profile_window.h" |
12 #include "chrome/browser/ui/host_desktop.h" | 12 #include "chrome/browser/ui/host_desktop.h" |
13 #include "chrome/browser/ui/webui/options/options_ui.h" | 13 #include "chrome/browser/ui/webui/options/options_ui.h" |
14 #include "google_apis/gaia/google_service_auth_error.h" | 14 #include "google_apis/gaia/google_service_auth_error.h" |
15 | 15 |
16 | 16 |
17 namespace base { | 17 namespace base { |
18 class DictionaryValue; | 18 class DictionaryValue; |
19 class ListValue; | 19 class ListValue; |
20 } | 20 } |
21 | 21 |
| 22 #if defined(ENABLE_MANAGED_USERS) |
22 class SupervisedUserRegistrationUtility; | 23 class SupervisedUserRegistrationUtility; |
| 24 #endif |
23 | 25 |
24 namespace options { | 26 namespace options { |
25 | 27 |
26 // Handler for the 'create profile' overlay. | 28 // Handler for the 'create profile' overlay. |
27 class CreateProfileHandler: public OptionsPageUIHandler { | 29 class CreateProfileHandler: public OptionsPageUIHandler { |
28 public: | 30 public: |
29 CreateProfileHandler(); | 31 CreateProfileHandler(); |
30 virtual ~CreateProfileHandler(); | 32 virtual ~CreateProfileHandler(); |
31 | 33 |
32 // OptionsPageUIHandler implementation. | 34 // OptionsPageUIHandler implementation. |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 const std::string& existing_supervised_user_id) const; | 145 const std::string& existing_supervised_user_id) const; |
144 | 146 |
145 // Used to allow cancelling a profile creation (particularly a supervised-user | 147 // Used to allow cancelling a profile creation (particularly a supervised-user |
146 // registration) in progress. Set when profile creation is begun, and | 148 // registration) in progress. Set when profile creation is begun, and |
147 // cleared when all the callbacks have been run and creation is complete. | 149 // cleared when all the callbacks have been run and creation is complete. |
148 base::FilePath profile_path_being_created_; | 150 base::FilePath profile_path_being_created_; |
149 | 151 |
150 // Used to track how long profile creation takes. | 152 // Used to track how long profile creation takes. |
151 base::TimeTicks profile_creation_start_time_; | 153 base::TimeTicks profile_creation_start_time_; |
152 | 154 |
| 155 #if defined(ENABLE_MANAGED_USERS) |
153 scoped_ptr<SupervisedUserRegistrationUtility> | 156 scoped_ptr<SupervisedUserRegistrationUtility> |
154 supervised_user_registration_utility_; | 157 supervised_user_registration_utility_; |
| 158 #endif |
155 | 159 |
156 // Indicates the type of the in progress profile creation operation. | 160 // Indicates the type of the in progress profile creation operation. |
157 // The value is only relevant while we are creating/importing a profile. | 161 // The value is only relevant while we are creating/importing a profile. |
158 ProfileCreationOperationType profile_creation_type_; | 162 ProfileCreationOperationType profile_creation_type_; |
159 | 163 |
160 base::WeakPtrFactory<CreateProfileHandler> weak_ptr_factory_; | 164 base::WeakPtrFactory<CreateProfileHandler> weak_ptr_factory_; |
161 | 165 |
162 DISALLOW_COPY_AND_ASSIGN(CreateProfileHandler); | 166 DISALLOW_COPY_AND_ASSIGN(CreateProfileHandler); |
163 }; | 167 }; |
164 | 168 |
165 } // namespace options | 169 } // namespace options |
166 | 170 |
167 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CREATE_PROFILE_HANDLER_H_ | 171 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CREATE_PROFILE_HANDLER_H_ |
OLD | NEW |