Chromium Code Reviews| Index: chrome/browser/managed_mode/managed_user_signin_manager_wrapper.h |
| diff --git a/chrome/browser/managed_mode/managed_user_signin_manager_wrapper.h b/chrome/browser/managed_mode/managed_user_signin_manager_wrapper.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a579af50dd5de08e34ecd06353e69cfa3f28e5fe |
| --- /dev/null |
| +++ b/chrome/browser/managed_mode/managed_user_signin_manager_wrapper.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SIGNIN_MANAGER_WRAPPER_H_ |
| +#define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SIGNIN_MANAGER_WRAPPER_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/basictypes.h" |
| + |
| +class Profile; |
| +class SigninManagerBase; |
| + |
| +// Some chrome cloud services support managed users as well as normally |
| +// authenticated users that sign in through SigninManager. To facilitate |
| +// getting the "effective" username and account identifiers, services can |
| +// use this class to wrap the SigninManager and return managed user account |
| +// information when appropriate. |
| +class ManagedUserSigninManagerWrapper { |
| + public: |
| + ManagedUserSigninManagerWrapper( |
| + Profile* profile, SigninManagerBase* original); |
|
Roger Tawa OOO till Jul 10th
2014/02/11 21:05:37
When is profile != original->profile() ? Seems li
tim (not reviewing)
2014/02/11 21:24:14
Good point! Done.
|
| + ~ManagedUserSigninManagerWrapper(); |
| + |
| + std::string GetEffectiveUsername() const; |
| + std::string GetAccountIdToUse() const; |
| + |
| + SigninManagerBase* GetOriginal(); |
| + |
| + private: |
| + Profile* profile_; |
| + SigninManagerBase* original_; |
| + DISALLOW_COPY_AND_ASSIGN(ManagedUserSigninManagerWrapper); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SIGNIN_MANAGER_WRAPPER_H_ |