OLD | NEW |
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 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" | 5 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/sys_info.h" | 9 #include "base/sys_info.h" |
10 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 10 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 account_id.GetUserEmail())); | 75 account_id.GetUserEmail())); |
76 user->SetStubImage(base::WrapUnique(new user_manager::UserImage( | 76 user->SetStubImage(base::WrapUnique(new user_manager::UserImage( |
77 *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 77 *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
78 IDR_PROFILE_PICTURE_LOADING))), | 78 IDR_PROFILE_PICTURE_LOADING))), |
79 user_manager::User::USER_IMAGE_PROFILE, false); | 79 user_manager::User::USER_IMAGE_PROFILE, false); |
80 users_.push_back(user); | 80 users_.push_back(user); |
81 chromeos::ProfileHelper::Get()->SetProfileToUserMappingForTesting(user); | 81 chromeos::ProfileHelper::Get()->SetProfileToUserMappingForTesting(user); |
82 return user; | 82 return user; |
83 } | 83 } |
84 | 84 |
| 85 bool FakeChromeUserManager::AreEphemeralUsersEnabled() const { |
| 86 return fake_ephemeral_users_enabled_; |
| 87 } |
| 88 |
85 void FakeChromeUserManager::LoginUser(const AccountId& account_id) { | 89 void FakeChromeUserManager::LoginUser(const AccountId& account_id) { |
86 UserLoggedIn(account_id, ProfileHelper::GetUserIdHashByUserIdForTesting( | 90 UserLoggedIn(account_id, ProfileHelper::GetUserIdHashByUserIdForTesting( |
87 account_id.GetUserEmail()), | 91 account_id.GetUserEmail()), |
88 false /* browser_restart */); | 92 false /* browser_restart */); |
89 } | 93 } |
90 | 94 |
91 BootstrapManager* FakeChromeUserManager::GetBootstrapManager() { | 95 BootstrapManager* FakeChromeUserManager::GetBootstrapManager() { |
92 return bootstrap_manager_; | 96 return bootstrap_manager_; |
93 } | 97 } |
94 | 98 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 NOTIMPLEMENTED(); | 281 NOTIMPLEMENTED(); |
278 return; | 282 return; |
279 } | 283 } |
280 | 284 |
281 bool FakeChromeUserManager::IsValidDefaultUserImageId(int image_index) const { | 285 bool FakeChromeUserManager::IsValidDefaultUserImageId(int image_index) const { |
282 NOTIMPLEMENTED(); | 286 NOTIMPLEMENTED(); |
283 return false; | 287 return false; |
284 } | 288 } |
285 | 289 |
286 } // namespace chromeos | 290 } // namespace chromeos |
OLD | NEW |