| Index: chrome/browser/chromeos/login/users/fake_user_manager.cc
|
| diff --git a/chrome/browser/chromeos/login/users/fake_user_manager.cc b/chrome/browser/chromeos/login/users/fake_user_manager.cc
|
| index fac64ea347611db640da1f8f87e6a703a8e20363..a75890d77f3ffeffd4172d1a4a7538fdfbf84f82 100644
|
| --- a/chrome/browser/chromeos/login/users/fake_user_manager.cc
|
| +++ b/chrome/browser/chromeos/login/users/fake_user_manager.cc
|
| @@ -312,12 +312,36 @@ bool FakeUserManager::IsUserNonCryptohomeDataEphemeral(
|
| return false;
|
| }
|
|
|
| +void FakeUserManager::SetUserFlow(const std::string& email, UserFlow* flow) {
|
| + ResetUserFlow(email);
|
| + specific_flows_[email] = flow;
|
| +}
|
| +
|
| UserFlow* FakeUserManager::GetCurrentUserFlow() const {
|
| - return NULL;
|
| + if (!IsUserLoggedIn())
|
| + return GetDefaultUserFlow();
|
| + return GetUserFlow(GetLoggedInUser()->email());
|
| }
|
|
|
| UserFlow* FakeUserManager::GetUserFlow(const std::string& email) const {
|
| - return NULL;
|
| + FlowMap::const_iterator it = specific_flows_.find(email);
|
| + if (it != specific_flows_.end())
|
| + return it->second;
|
| + return GetDefaultUserFlow();
|
| +}
|
| +
|
| +void FakeUserManager::ResetUserFlow(const std::string& email) {
|
| + FlowMap::iterator it = specific_flows_.find(email);
|
| + if (it != specific_flows_.end()) {
|
| + delete it->second;
|
| + specific_flows_.erase(it);
|
| + }
|
| +}
|
| +
|
| +UserFlow* FakeUserManager::GetDefaultUserFlow() const {
|
| + if (!default_flow_.get())
|
| + default_flow_.reset(new DefaultUserFlow());
|
| + return default_flow_.get();
|
| }
|
|
|
| bool FakeUserManager::AreSupervisedUsersAllowed() const {
|
|
|