Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Side by Side Diff: chrome/browser/chromeos/login/users/supervised_user_manager_impl.h

Issue 444903002: [cros] user_manager component - move UserManagerBase and UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_CHROMEOS_LOGIN_USERS_SUPERVISED_USER_MANAGER_IMPL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_SUPERVISED_USER_MANAGER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_SUPERVISED_USER_MANAGER_IMPL_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_SUPERVISED_USER_MANAGER_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/chromeos/login/supervised/supervised_user_authenticatio n.h" 12 #include "chrome/browser/chromeos/login/supervised/supervised_user_authenticatio n.h"
13 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" 13 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 class ChromeUserManager; 17 class ChromeUserManagerImpl;
18 class CrosSettings; 18 class CrosSettings;
19 19
20 // Implementation of the UserManager. 20 // Implementation of the UserManager.
21 class SupervisedUserManagerImpl 21 class SupervisedUserManagerImpl
22 : public SupervisedUserManager { 22 : public SupervisedUserManager {
23 public: 23 public:
24 virtual ~SupervisedUserManagerImpl(); 24 virtual ~SupervisedUserManagerImpl();
25 25
26 virtual bool HasSupervisedUsers(const std::string& manager_id) const OVERRIDE; 26 virtual bool HasSupervisedUsers(const std::string& manager_id) const OVERRIDE;
27 virtual const user_manager::User* CreateUserRecord( 27 virtual const user_manager::User* CreateUserRecord(
(...skipping 25 matching lines...) Expand all
53 const std::string& user_id, 53 const std::string& user_id,
54 const base::DictionaryValue* password_info) OVERRIDE; 54 const base::DictionaryValue* password_info) OVERRIDE;
55 virtual void LoadSupervisedUserToken( 55 virtual void LoadSupervisedUserToken(
56 Profile * profile, 56 Profile * profile,
57 const LoadTokenCallback& callback) OVERRIDE; 57 const LoadTokenCallback& callback) OVERRIDE;
58 virtual void ConfigureSyncWithToken( 58 virtual void ConfigureSyncWithToken(
59 Profile* profile, 59 Profile* profile,
60 const std::string& token) OVERRIDE; 60 const std::string& token) OVERRIDE;
61 61
62 private: 62 private:
63 friend class ChromeUserManager; 63 friend class ChromeUserManagerImpl;
64 friend class UserManager; 64 friend class UserManager;
65 65
66 explicit SupervisedUserManagerImpl(ChromeUserManager* owner); 66 explicit SupervisedUserManagerImpl(ChromeUserManagerImpl* owner);
67 67
68 // Returns true if there is non-committed user creation transaction. 68 // Returns true if there is non-committed user creation transaction.
69 bool HasFailedUserCreationTransaction(); 69 bool HasFailedUserCreationTransaction();
70 70
71 // Attempts to clean up data that could be left from failed user creation. 71 // Attempts to clean up data that could be left from failed user creation.
72 void RollbackUserCreationTransaction(); 72 void RollbackUserCreationTransaction();
73 73
74 void RemoveNonCryptohomeData(const std::string& user_id); 74 void RemoveNonCryptohomeData(const std::string& user_id);
75 75
76 bool CheckForFirstRun(const std::string& user_id); 76 bool CheckForFirstRun(const std::string& user_id);
(...skipping 22 matching lines...) Expand all
99 const char* key, 99 const char* key,
100 bool* out_value) const; 100 bool* out_value) const;
101 101
102 void SetUserBooleanValue(const std::string& user_id, 102 void SetUserBooleanValue(const std::string& user_id,
103 const char* key, 103 const char* key,
104 const bool value); 104 const bool value);
105 105
106 void CleanPref(const std::string& user_id, 106 void CleanPref(const std::string& user_id,
107 const char* key); 107 const char* key);
108 108
109 ChromeUserManager* owner_; 109 ChromeUserManagerImpl* owner_;
110 110
111 // Interface to the signed settings store. 111 // Interface to the signed settings store.
112 CrosSettings* cros_settings_; 112 CrosSettings* cros_settings_;
113 113
114 scoped_ptr<SupervisedUserAuthentication> authentication_; 114 scoped_ptr<SupervisedUserAuthentication> authentication_;
115 115
116 DISALLOW_COPY_AND_ASSIGN(SupervisedUserManagerImpl); 116 DISALLOW_COPY_AND_ASSIGN(SupervisedUserManagerImpl);
117 }; 117 };
118 118
119 } // namespace chromeos 119 } // namespace chromeos
120 120
121 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_SUPERVISED_USER_MANAGER_IMPL_H_ 121 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_SUPERVISED_USER_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698