| 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 <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 | 521 |
| 522 bool FakeChromeUserManager::IsLoggedInAsStub() const { | 522 bool FakeChromeUserManager::IsLoggedInAsStub() const { |
| 523 return false; | 523 return false; |
| 524 } | 524 } |
| 525 | 525 |
| 526 bool FakeChromeUserManager::IsUserNonCryptohomeDataEphemeral( | 526 bool FakeChromeUserManager::IsUserNonCryptohomeDataEphemeral( |
| 527 const AccountId& account_id) const { | 527 const AccountId& account_id) const { |
| 528 return false; | 528 return false; |
| 529 } | 529 } |
| 530 | 530 |
| 531 void FakeChromeUserManager::AddObserver(UserManager::Observer* obs) { | |
| 532 NOTREACHED(); | |
| 533 } | |
| 534 | |
| 535 void FakeChromeUserManager::RemoveObserver(UserManager::Observer* obs) { | |
| 536 NOTREACHED(); | |
| 537 } | |
| 538 | |
| 539 void FakeChromeUserManager::AddSessionStateObserver( | |
| 540 UserManager::UserSessionStateObserver* obs) {} | |
| 541 | |
| 542 void FakeChromeUserManager::RemoveSessionStateObserver( | |
| 543 UserManager::UserSessionStateObserver* obs) {} | |
| 544 | |
| 545 void FakeChromeUserManager::NotifyLocalStateChanged() { | |
| 546 NOTREACHED(); | |
| 547 } | |
| 548 | |
| 549 void FakeChromeUserManager::ChangeUserChildStatus(user_manager::User* user, | 531 void FakeChromeUserManager::ChangeUserChildStatus(user_manager::User* user, |
| 550 bool is_child) { | 532 bool is_child) { |
| 551 NOTREACHED(); | 533 NOTREACHED(); |
| 552 } | 534 } |
| 553 | 535 |
| 554 bool FakeChromeUserManager::AreSupervisedUsersAllowed() const { | 536 bool FakeChromeUserManager::AreSupervisedUsersAllowed() const { |
| 555 return true; | 537 return true; |
| 556 } | 538 } |
| 557 | 539 |
| 558 PrefService* FakeChromeUserManager::GetLocalState() const { | 540 PrefService* FakeChromeUserManager::GetLocalState() const { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 if (active_account_id_.is_valid()) { | 626 if (active_account_id_.is_valid()) { |
| 645 for (const auto& user : users_) { | 627 for (const auto& user : users_) { |
| 646 if (user->GetAccountId() == active_account_id_) | 628 if (user->GetAccountId() == active_account_id_) |
| 647 return user; | 629 return user; |
| 648 } | 630 } |
| 649 } | 631 } |
| 650 return users_[0]; | 632 return users_[0]; |
| 651 } | 633 } |
| 652 | 634 |
| 653 } // namespace chromeos | 635 } // namespace chromeos |
| OLD | NEW |