Index: chrome/browser/ui/webui/options/create_profile_handler.h |
diff --git a/chrome/browser/ui/webui/options/create_profile_handler.h b/chrome/browser/ui/webui/options/create_profile_handler.h |
index 34942e997702ec60f58c250a90fd97a102f8b4db..a6d3cf84bbff178ef863c50a32f7ccd435458417 100644 |
--- a/chrome/browser/ui/webui/options/create_profile_handler.h |
+++ b/chrome/browser/ui/webui/options/create_profile_handler.h |
@@ -19,7 +19,9 @@ class DictionaryValue; |
class ListValue; |
} |
+#if defined(ENABLE_MANAGED_USERS) |
class SupervisedUserRegistrationUtility; |
+#endif |
namespace options { |
@@ -57,8 +59,10 @@ class CreateProfileHandler: public OptionsPageUIHandler { |
// It is used to map the type of the profile creation operation to the |
// correct UMA metric name. |
enum ProfileCreationOperationType { |
+#if defined(ENABLE_MANAGED_USERS) |
SUPERVISED_PROFILE_CREATION, |
SUPERVISED_PROFILE_IMPORT, |
+#endif |
NON_SUPERVISED_PROFILE_CREATION, |
NO_CREATION_IN_PROGRESS |
}; |
@@ -90,19 +94,6 @@ class CreateProfileHandler: public OptionsPageUIHandler { |
const std::string& supervised_user_id, |
Profile* profile); |
- // After a new supervised-user profile has been created, registers the user |
- // with the management server. |
- void RegisterSupervisedUser(bool create_shortcut, |
- chrome::HostDesktopType desktop_type, |
- const std::string& managed_user_id, |
- Profile* new_profile); |
- |
- // Called back with the result of the supervised user registration. |
- void OnSupervisedUserRegistered(bool create_shortcut, |
- chrome::HostDesktopType desktop_type, |
- Profile* profile, |
- const GoogleServiceAuthError& error); |
- |
// Creates desktop shortcut and updates the UI to indicate success |
// when creating a profile. |
void CreateShortcutAndShowSuccess(bool create_shortcut, |
@@ -130,18 +121,10 @@ class CreateProfileHandler: public OptionsPageUIHandler { |
// Records UMA histograms relevant to profile creation. |
void RecordProfileCreationMetrics(Profile::CreateStatus status); |
- // Records UMA histograms relevant to supervised user profiles |
- // creation and registration. |
- void RecordSupervisedProfileCreationMetrics( |
- GoogleServiceAuthError::State error_state); |
- |
base::string16 GetProfileCreationErrorMessage( |
ProfileCreationErrorType error) const; |
std::string GetJavascriptMethodName(ProfileCreationStatus status) const; |
- bool IsValidExistingSupervisedUserId( |
- const std::string& existing_supervised_user_id) const; |
- |
// Used to allow cancelling a profile creation (particularly a supervised-user |
// registration) in progress. Set when profile creation is begun, and |
// cleared when all the callbacks have been run and creation is complete. |
@@ -150,15 +133,39 @@ class CreateProfileHandler: public OptionsPageUIHandler { |
// Used to track how long profile creation takes. |
base::TimeTicks profile_creation_start_time_; |
- scoped_ptr<SupervisedUserRegistrationUtility> |
- supervised_user_registration_utility_; |
- |
// Indicates the type of the in progress profile creation operation. |
// The value is only relevant while we are creating/importing a profile. |
ProfileCreationOperationType profile_creation_type_; |
base::WeakPtrFactory<CreateProfileHandler> weak_ptr_factory_; |
Bernhard Bauer
2014/07/14 16:39:06
This should be the last member of the object, to e
mckev
2014/07/14 23:50:03
Good catch - thanks for pointing it out.
|
+ |
+#if defined(ENABLE_MANAGED_USERS) |
+ // After a new supervised-user profile has been created, registers the user |
+ // with the management server. |
+ void RegisterSupervisedUser(bool create_shortcut, |
+ chrome::HostDesktopType desktop_type, |
+ const std::string& managed_user_id, |
+ Profile* new_profile); |
+ |
+ // Called back with the result of the supervised user registration. |
+ void OnSupervisedUserRegistered(bool create_shortcut, |
+ chrome::HostDesktopType desktop_type, |
+ Profile* profile, |
+ const GoogleServiceAuthError& error); |
+ |
+ // Records UMA histograms relevant to supervised user profiles |
+ // creation and registration. |
+ void RecordSupervisedProfileCreationMetrics( |
+ GoogleServiceAuthError::State error_state); |
+ |
+ bool IsValidExistingSupervisedUserId( |
+ const std::string& existing_supervised_user_id) const; |
+ |
+ scoped_ptr<SupervisedUserRegistrationUtility> |
+ supervised_user_registration_utility_; |
+#endif |
+ |
DISALLOW_COPY_AND_ASSIGN(CreateProfileHandler); |
}; |