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 } | |
161 return NULL; | 156 return NULL; |
162 } | 157 } |
163 | 158 |
164 User* FakeUserManager::FindUserAndModify(const std::string& email) { | 159 User* FakeUserManager::FindUserAndModify(const std::string& email) { |
165 return NULL; | 160 return NULL; |
166 } | 161 } |
167 | 162 |
168 const User* FakeUserManager::GetLoggedInUser() const { | 163 const User* FakeUserManager::GetLoggedInUser() const { |
169 return NULL; | 164 return NULL; |
170 } | 165 } |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 } | 290 } |
296 | 291 |
297 bool FakeUserManager::RespectLocalePreference( | 292 bool FakeUserManager::RespectLocalePreference( |
298 Profile* profile, | 293 Profile* profile, |
299 const User* user, | 294 const User* user, |
300 scoped_ptr<locale_util::SwitchLanguageCallback> callback) const { | 295 scoped_ptr<locale_util::SwitchLanguageCallback> callback) const { |
301 return false; | 296 return false; |
302 } | 297 } |
303 | 298 |
304 } // namespace chromeos | 299 } // namespace chromeos |
OLD | NEW |