| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_MANAGED_MODE_MANAGED_USER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ |
| 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ | 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 void InitSync(const std::string& refresh_token); | 124 void InitSync(const std::string& refresh_token); |
| 125 | 125 |
| 126 // Convenience method that registers this managed user using | 126 // Convenience method that registers this managed user using |
| 127 // |registration_utility| and initializes sync with the returned token. | 127 // |registration_utility| and initializes sync with the returned token. |
| 128 // The |callback| will be called when registration is complete, | 128 // The |callback| will be called when registration is complete, |
| 129 // whether it suceeded or not -- unless registration was cancelled manually, | 129 // whether it suceeded or not -- unless registration was cancelled manually, |
| 130 // in which case the callback will be ignored. | 130 // in which case the callback will be ignored. |
| 131 void RegisterAndInitSync(ManagedUserRegistrationUtility* registration_utility, | 131 void RegisterAndInitSync(ManagedUserRegistrationUtility* registration_utility, |
| 132 Profile* custodian_profile, | 132 Profile* custodian_profile, |
| 133 const std::string& managed_user_id, | 133 const std::string& managed_user_id, |
| 134 bool update_avatar, |
| 134 const AuthErrorCallback& callback); | 135 const AuthErrorCallback& callback); |
| 135 | 136 |
| 136 // Returns a pseudo-email address for systems that expect well-formed email | 137 // Returns a pseudo-email address for systems that expect well-formed email |
| 137 // addresses (like Sync), even though we're not signed in. | 138 // addresses (like Sync), even though we're not signed in. |
| 138 static const char* GetManagedUserPseudoEmail(); | 139 static const char* GetManagedUserPseudoEmail(); |
| 139 | 140 |
| 140 void set_elevated_for_testing(bool skip) { | 141 void set_elevated_for_testing(bool skip) { |
| 141 elevated_for_testing_ = skip; | 142 elevated_for_testing_ = skip; |
| 142 } | 143 } |
| 143 | 144 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 // Sets a profile in elevated state for testing if set to true. | 267 // Sets a profile in elevated state for testing if set to true. |
| 267 bool elevated_for_testing_; | 268 bool elevated_for_testing_; |
| 268 | 269 |
| 269 // True only when |Shutdown()| method has been called. | 270 // True only when |Shutdown()| method has been called. |
| 270 bool did_shutdown_; | 271 bool did_shutdown_; |
| 271 | 272 |
| 272 URLFilterContext url_filter_context_; | 273 URLFilterContext url_filter_context_; |
| 273 }; | 274 }; |
| 274 | 275 |
| 275 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ | 276 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ |
| OLD | NEW |