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

Unified Diff: chrome/browser/chromeos/login/users/fake_chrome_user_manager.h

Issue 1412813003: 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: Fix Win GN build. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/users/fake_chrome_user_manager.h
diff --git a/chrome/browser/chromeos/login/users/fake_chrome_user_manager.h b/chrome/browser/chromeos/login/users/fake_chrome_user_manager.h
index d5c90fcc26b13a1d99e59ecaa80d43ba4572edcd..6c4d975284f6320cbc9a8e78d570d5cc4677428f 100644
--- a/chrome/browser/chromeos/login/users/fake_chrome_user_manager.h
+++ b/chrome/browser/chromeos/login/users/fake_chrome_user_manager.h
@@ -29,46 +29,46 @@ class FakeChromeUserManager : public user_manager::FakeUserManager,
~FakeChromeUserManager() override;
// Create and add a kiosk app user.
- void AddKioskAppUser(const std::string& kiosk_app_username);
+ void AddKioskAppUser(const AccountId& kiosk_app_account_id);
// Create and add a public account user.
- const user_manager::User* AddPublicAccountUser(const std::string& email);
+ const user_manager::User* AddPublicAccountUser(const AccountId& account_id);
// Calculates the user name hash and calls UserLoggedIn to login a user.
- void LoginUser(const std::string& email);
+ void LoginUser(const AccountId& account_id);
// UserManager overrides.
user_manager::UserList GetUsersAllowedForMultiProfile() const override;
// user_manager::FakeUserManager override.
- const user_manager::User* AddUser(const std::string& email) override;
- const user_manager::User* AddUserWithAffiliation(const std::string& email,
+ const user_manager::User* AddUser(const AccountId& account_id) override;
+ const user_manager::User* AddUserWithAffiliation(const AccountId& account_id,
bool is_affiliated) override;
// UserManagerInterface implementation.
BootstrapManager* GetBootstrapManager() override;
MultiProfileUserController* GetMultiProfileUserController() override;
- UserImageManager* GetUserImageManager(const std::string& user_id) override;
+ UserImageManager* GetUserImageManager(const AccountId& account_id) override;
SupervisedUserManager* GetSupervisedUserManager() override;
- void SetUserFlow(const std::string& email, UserFlow* flow) override;
+ void SetUserFlow(const AccountId& account_id, UserFlow* flow) override;
UserFlow* GetCurrentUserFlow() const override;
- UserFlow* GetUserFlow(const std::string& email) const override;
- void ResetUserFlow(const std::string& email) override;
+ UserFlow* GetUserFlow(const AccountId& account_id) const override;
+ void ResetUserFlow(const AccountId& account_id) override;
user_manager::UserList GetUsersAllowedForSupervisedUsersCreation()
const override;
- void SwitchActiveUser(const std::string& email) override;
- const std::string& GetOwnerEmail() const override;
+ void SwitchActiveUser(const AccountId& account_id) override;
+ const AccountId& GetOwnerAccountId() const override;
void SessionStarted() override;
- void RemoveUser(const std::string& email,
+ void RemoveUser(const AccountId& account_id,
user_manager::RemoveUserDelegate* delegate) override;
- bool FindKnownUserPrefs(const user_manager::UserID& user_id,
+ bool FindKnownUserPrefs(const AccountId& account_id,
const base::DictionaryValue** out_value) override;
- void UpdateKnownUserPrefs(const user_manager::UserID& user_id,
+ void UpdateKnownUserPrefs(const AccountId& account_id,
const base::DictionaryValue& values,
bool clear) override;
- void set_owner_email(const std::string& owner_email) {
- owner_email_ = owner_email;
+ void set_owner_id(const AccountId& owner_account_id) {
+ owner_account_id_ = owner_account_id;
}
void set_bootstrap_manager(BootstrapManager* bootstrap_manager) {
@@ -85,16 +85,16 @@ class FakeChromeUserManager : public user_manager::FakeUserManager,
UserFlow* GetDefaultUserFlow() const;
scoped_ptr<FakeSupervisedUserManager> supervised_user_manager_;
- std::string owner_email_;
+ AccountId owner_account_id_ = EmptyAccountId();
BootstrapManager* bootstrap_manager_;
MultiProfileUserController* multi_profile_user_controller_;
- typedef std::map<std::string, UserFlow*> FlowMap;
-
// Lazy-initialized default flow.
mutable scoped_ptr<UserFlow> default_flow_;
+ using FlowMap = std::map<AccountId, UserFlow*>;
+
// Specific flows by user e-mail.
// Keys should be canonicalized before access.
FlowMap specific_flows_;

Powered by Google App Engine
This is Rietveld 408576698