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

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

Issue 1425093004: Revert of This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_USER_MANAGER_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "components/user_manager/user.h" 9 #include "components/user_manager/user.h"
10 #include "components/user_manager/user_type.h" 10 #include "components/user_manager/user_type.h"
11 11
12 class AccountId;
13
14 namespace chromeos { 12 namespace chromeos {
15 13
16 class BootstrapManager; 14 class BootstrapManager;
17 class MultiProfileUserController; 15 class MultiProfileUserController;
18 class SupervisedUserManager; 16 class SupervisedUserManager;
19 class UserFlow; 17 class UserFlow;
20 class UserImageManager; 18 class UserImageManager;
21 19
22 // ChromeOS specific add-ons interface for the UserManager. 20 // Chrome specific add-ons interface for the UserManager.
23 class UserManagerInterface { 21 class UserManagerInterface {
24 public: 22 public:
25 UserManagerInterface() {} 23 UserManagerInterface() {}
26 virtual ~UserManagerInterface() {} 24 virtual ~UserManagerInterface() {}
27 25
28 virtual BootstrapManager* GetBootstrapManager() = 0; 26 virtual BootstrapManager* GetBootstrapManager() = 0;
29 virtual MultiProfileUserController* GetMultiProfileUserController() = 0; 27 virtual MultiProfileUserController* GetMultiProfileUserController() = 0;
30 virtual UserImageManager* GetUserImageManager( 28 virtual UserImageManager* GetUserImageManager(const std::string& user_id) = 0;
31 const AccountId& account_id) = 0;
32 virtual SupervisedUserManager* GetSupervisedUserManager() = 0; 29 virtual SupervisedUserManager* GetSupervisedUserManager() = 0;
33 30
34 // Method that allows to set |flow| for user identified by |account_id|. 31 // Method that allows to set |flow| for user identified by |user_id|.
35 // Flow should be set before login attempt. 32 // Flow should be set before login attempt.
36 // Takes ownership of the |flow|, |flow| will be deleted in case of login 33 // Takes ownership of the |flow|, |flow| will be deleted in case of login
37 // failure. 34 // failure.
38 virtual void SetUserFlow(const AccountId& account_id, UserFlow* flow) = 0; 35 virtual void SetUserFlow(const std::string& user_id, UserFlow* flow) = 0;
39 36
40 // Return user flow for current user. Returns instance of DefaultUserFlow if 37 // Return user flow for current user. Returns instance of DefaultUserFlow if
41 // no flow was defined for current user, or user is not logged in. 38 // no flow was defined for current user, or user is not logged in.
42 // Returned value should not be cached. 39 // Returned value should not be cached.
43 virtual UserFlow* GetCurrentUserFlow() const = 0; 40 virtual UserFlow* GetCurrentUserFlow() const = 0;
44 41
45 // Return user flow for user identified by |account_id|. Returns instance of 42 // Return user flow for user identified by |user_id|. Returns instance of
46 // DefaultUserFlow if no flow was defined for user. 43 // DefaultUserFlow if no flow was defined for user.
47 // Returned value should not be cached. 44 // Returned value should not be cached.
48 virtual UserFlow* GetUserFlow(const AccountId& account_id) const = 0; 45 virtual UserFlow* GetUserFlow(const std::string& user_id) const = 0;
49 46
50 // Resets user flow for user identified by |account_id|. 47 // Resets user flow for user identified by |user_id|.
51 virtual void ResetUserFlow(const AccountId& account_id) = 0; 48 virtual void ResetUserFlow(const std::string& user_id) = 0;
52 49
53 // Returns list of users allowed for supervised user creation. 50 // Returns list of users allowed for supervised user creation.
54 // Returns an empty list in cases when supervised user creation or adding new 51 // Returns an empty list in cases when supervised user creation or adding new
55 // users is restricted. 52 // users is restricted.
56 virtual user_manager::UserList GetUsersAllowedForSupervisedUsersCreation() 53 virtual user_manager::UserList GetUsersAllowedForSupervisedUsersCreation()
57 const = 0; 54 const = 0;
58 55
59 DISALLOW_COPY_AND_ASSIGN(UserManagerInterface); 56 DISALLOW_COPY_AND_ASSIGN(UserManagerInterface);
60 }; 57 };
61 58
62 } // namespace chromeos 59 } // namespace chromeos
63 60
64 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_ 61 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698