OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 std::string GetCustodianName() const; | 132 std::string GetCustodianName() const; |
133 | 133 |
134 // Returns the email address of the second custodian, or the empty string | 134 // Returns the email address of the second custodian, or the empty string |
135 // if there is no second custodian. | 135 // if there is no second custodian. |
136 std::string GetSecondCustodianEmailAddress() const; | 136 std::string GetSecondCustodianEmailAddress() const; |
137 | 137 |
138 // Returns the name of the second custodian, or the email address if the name | 138 // Returns the name of the second custodian, or the email address if the name |
139 // is empty, or the empty string is there is no second custodian. | 139 // is empty, or the empty string is there is no second custodian. |
140 std::string GetSecondCustodianName() const; | 140 std::string GetSecondCustodianName() const; |
141 | 141 |
142 // Initializes this object. This method does nothing if the profile is not | 142 // Initializes this object. |
143 // supervised. | |
144 void Init(); | 143 void Init(); |
145 | 144 |
146 // Initializes this profile for syncing, using the provided |refresh_token| to | 145 // Initializes this profile for syncing, using the provided |refresh_token| to |
147 // mint access tokens for Sync. | 146 // mint access tokens for Sync. |
148 void InitSync(const std::string& refresh_token); | 147 void InitSync(const std::string& refresh_token); |
149 | 148 |
150 // Convenience method that registers this supervised user using | 149 // Convenience method that registers this supervised user using |
151 // |registration_utility| and initializes sync with the returned token. | 150 // |registration_utility| and initializes sync with the returned token. |
152 // The |callback| will be called when registration is complete, | 151 // The |callback| will be called when registration is complete, |
153 // whether it succeeded or not -- unless registration was cancelled manually, | 152 // whether it succeeded or not -- unless registration was cancelled manually, |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 357 |
359 // Used to create permission requests. | 358 // Used to create permission requests. |
360 ScopedVector<PermissionRequestCreator> permissions_creators_; | 359 ScopedVector<PermissionRequestCreator> permissions_creators_; |
361 | 360 |
362 ObserverList<SupervisedUserServiceObserver> observer_list_; | 361 ObserverList<SupervisedUserServiceObserver> observer_list_; |
363 | 362 |
364 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; | 363 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; |
365 }; | 364 }; |
366 | 365 |
367 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 366 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
OLD | NEW |