| 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_SYNC_SUPERVISED_USER_SIGNIN_MANAGER_WRAPPER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SUPERVISED_USER_SIGNIN_MANAGER_WRAPPER_H_ |
| 6 #define CHROME_BROWSER_SYNC_SUPERVISED_USER_SIGNIN_MANAGER_WRAPPER_H_ | 6 #define CHROME_BROWSER_SYNC_SUPERVISED_USER_SIGNIN_MANAGER_WRAPPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "components/sync_driver/signin_manager_wrapper.h" | 11 #include "components/sync/driver/signin_manager_wrapper.h" |
| 12 | 12 |
| 13 class Profile; | 13 class Profile; |
| 14 class SigninManagerBase; | 14 class SigninManagerBase; |
| 15 | 15 |
| 16 // Some chrome cloud services support supervised users as well as normally | 16 // Some chrome cloud services support supervised users as well as normally |
| 17 // authenticated users that sign in through SigninManager. To facilitate | 17 // authenticated users that sign in through SigninManager. To facilitate |
| 18 // getting the "effective" username and account identifiers, services can | 18 // getting the "effective" username and account identifiers, services can |
| 19 // use this class to wrap the SigninManager and return supervised user account | 19 // use this class to wrap the SigninManager and return supervised user account |
| 20 // information when appropriate. | 20 // information when appropriate. |
| 21 class SupervisedUserSigninManagerWrapper : public SigninManagerWrapper { | 21 class SupervisedUserSigninManagerWrapper : public SigninManagerWrapper { |
| 22 public: | 22 public: |
| 23 SupervisedUserSigninManagerWrapper(Profile* profile, | 23 SupervisedUserSigninManagerWrapper(Profile* profile, |
| 24 SigninManagerBase* original); | 24 SigninManagerBase* original); |
| 25 ~SupervisedUserSigninManagerWrapper() override; | 25 ~SupervisedUserSigninManagerWrapper() override; |
| 26 | 26 |
| 27 // SigninManagerWrapper implementation | 27 // SigninManagerWrapper implementation |
| 28 std::string GetEffectiveUsername() const override; | 28 std::string GetEffectiveUsername() const override; |
| 29 std::string GetAccountIdToUse() const override; | 29 std::string GetAccountIdToUse() const override; |
| 30 std::string GetSyncScopeToUse() const override; | 30 std::string GetSyncScopeToUse() const override; |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 Profile* profile_; | 33 Profile* profile_; |
| 34 | 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(SupervisedUserSigninManagerWrapper); | 35 DISALLOW_COPY_AND_ASSIGN(SupervisedUserSigninManagerWrapper); |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 #endif // CHROME_BROWSER_SYNC_SUPERVISED_USER_SIGNIN_MANAGER_WRAPPER_H_ | 38 #endif // CHROME_BROWSER_SYNC_SUPERVISED_USER_SIGNIN_MANAGER_WRAPPER_H_ |
| OLD | NEW |