OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_user_manager.h" | 5 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/login/users/fake_supervised_user_manager.h" | 7 #include "chrome/browser/chromeos/login/users/fake_supervised_user_manager.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 const std::string& FakeUserManager::GetOwnerEmail() { | 147 const std::string& FakeUserManager::GetOwnerEmail() { |
148 return owner_email_; | 148 return owner_email_; |
149 } | 149 } |
150 | 150 |
151 bool FakeUserManager::IsKnownUser(const std::string& email) const { | 151 bool FakeUserManager::IsKnownUser(const std::string& email) const { |
152 return true; | 152 return true; |
153 } | 153 } |
154 | 154 |
155 const User* FakeUserManager::FindUser(const std::string& email) const { | 155 const User* FakeUserManager::FindUser(const std::string& email) const { |
| 156 const UserList& users = GetUsers(); |
| 157 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) { |
| 158 if ((*it)->email() == email) |
| 159 return *it; |
| 160 } |
156 return NULL; | 161 return NULL; |
157 } | 162 } |
158 | 163 |
159 User* FakeUserManager::FindUserAndModify(const std::string& email) { | 164 User* FakeUserManager::FindUserAndModify(const std::string& email) { |
160 return NULL; | 165 return NULL; |
161 } | 166 } |
162 | 167 |
163 const User* FakeUserManager::GetLoggedInUser() const { | 168 const User* FakeUserManager::GetLoggedInUser() const { |
164 return NULL; | 169 return NULL; |
165 } | 170 } |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 } | 295 } |
291 | 296 |
292 bool FakeUserManager::RespectLocalePreference( | 297 bool FakeUserManager::RespectLocalePreference( |
293 Profile* profile, | 298 Profile* profile, |
294 const User* user, | 299 const User* user, |
295 scoped_ptr<locale_util::SwitchLanguageCallback> callback) const { | 300 scoped_ptr<locale_util::SwitchLanguageCallback> callback) const { |
296 return false; | 301 return false; |
297 } | 302 } |
298 | 303 |
299 } // namespace chromeos | 304 } // namespace chromeos |
OLD | NEW |