| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/fake_user_manager.h" | 5 #include "chrome/browser/chromeos/login/fake_user_manager.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chromeos/login/fake_supervised_user_manager.h" | 7 #include "chrome/browser/chromeos/login/fake_supervised_user_manager.h" |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 User* FakeUserManager::GetActiveUser() { | 101 User* FakeUserManager::GetActiveUser() { |
| 102 return GetActiveUserInternal(); | 102 return GetActiveUserInternal(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void FakeUserManager::SwitchActiveUser(const std::string& email) { | 105 void FakeUserManager::SwitchActiveUser(const std::string& email) { |
| 106 active_user_id_ = email; | 106 active_user_id_ = email; |
| 107 } | 107 } |
| 108 | 108 |
| 109 void FakeUserManager::SaveUserDisplayName( | 109 void FakeUserManager::SaveUserDisplayName( |
| 110 const std::string& username, | 110 const std::string& username, |
| 111 const string16& display_name) { | 111 const base::string16& display_name) { |
| 112 for (UserList::iterator it = user_list_.begin(); | 112 for (UserList::iterator it = user_list_.begin(); |
| 113 it != user_list_.end(); ++it) { | 113 it != user_list_.end(); ++it) { |
| 114 if ((*it)->email() == username) { | 114 if ((*it)->email() == username) { |
| 115 (*it)->set_display_name(display_name); | 115 (*it)->set_display_name(display_name); |
| 116 return; | 116 return; |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 } | 119 } |
| 120 | 120 |
| 121 SupervisedUserManager* FakeUserManager::GetSupervisedUserManager() { | 121 SupervisedUserManager* FakeUserManager::GetSupervisedUserManager() { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 return primary_user_; | 172 return primary_user_; |
| 173 } | 173 } |
| 174 | 174 |
| 175 Profile* FakeUserManager::GetProfileByUser(const User* user) const { | 175 Profile* FakeUserManager::GetProfileByUser(const User* user) const { |
| 176 NOTIMPLEMENTED(); | 176 NOTIMPLEMENTED(); |
| 177 return NULL; | 177 return NULL; |
| 178 } | 178 } |
| 179 | 179 |
| 180 string16 FakeUserManager::GetUserDisplayName( | 180 string16 FakeUserManager::GetUserDisplayName( |
| 181 const std::string& username) const { | 181 const std::string& username) const { |
| 182 return string16(); | 182 return base::string16(); |
| 183 } | 183 } |
| 184 | 184 |
| 185 std::string FakeUserManager::GetUserDisplayEmail( | 185 std::string FakeUserManager::GetUserDisplayEmail( |
| 186 const std::string& username) const { | 186 const std::string& username) const { |
| 187 return std::string(); | 187 return std::string(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 bool FakeUserManager::IsCurrentUserOwner() const { | 190 bool FakeUserManager::IsCurrentUserOwner() const { |
| 191 return false; | 191 return false; |
| 192 } | 192 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 } | 279 } |
| 280 | 280 |
| 281 bool FakeUserManager::RespectLocalePreference( | 281 bool FakeUserManager::RespectLocalePreference( |
| 282 Profile* profile, | 282 Profile* profile, |
| 283 const User* user, | 283 const User* user, |
| 284 scoped_ptr<locale_util::SwitchLanguageCallback> callback) const { | 284 scoped_ptr<locale_util::SwitchLanguageCallback> callback) const { |
| 285 return false; | 285 return false; |
| 286 } | 286 } |
| 287 | 287 |
| 288 } // namespace chromeos | 288 } // namespace chromeos |
| OLD | NEW |