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/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 ~FakeTaskRunner() override {} | 35 ~FakeTaskRunner() override {} |
36 | 36 |
37 private: | 37 private: |
38 // base::TaskRunner overrides. | 38 // base::TaskRunner overrides. |
39 bool PostDelayedTask(const tracked_objects::Location& from_here, | 39 bool PostDelayedTask(const tracked_objects::Location& from_here, |
40 base::OnceClosure task, | 40 base::OnceClosure task, |
41 base::TimeDelta delay) override { | 41 base::TimeDelta delay) override { |
42 std::move(task).Run(); | 42 std::move(task).Run(); |
43 return true; | 43 return true; |
44 } | 44 } |
45 bool RunsTasksOnCurrentThread() const override { return true; } | 45 bool RunsTasksInCurrentSequence() const override { return true; } |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(FakeTaskRunner); | 47 DISALLOW_COPY_AND_ASSIGN(FakeTaskRunner); |
48 }; | 48 }; |
49 | 49 |
50 } // namespace | 50 } // namespace |
51 | 51 |
52 namespace chromeos { | 52 namespace chromeos { |
53 | 53 |
54 class FakeSupervisedUserManager; | 54 class FakeSupervisedUserManager; |
55 | 55 |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 if (active_account_id_.is_valid()) { | 649 if (active_account_id_.is_valid()) { |
650 for (auto* user : users_) { | 650 for (auto* user : users_) { |
651 if (user->GetAccountId() == active_account_id_) | 651 if (user->GetAccountId() == active_account_id_) |
652 return user; | 652 return user; |
653 } | 653 } |
654 } | 654 } |
655 return users_[0]; | 655 return users_[0]; |
656 } | 656 } |
657 | 657 |
658 } // namespace chromeos | 658 } // namespace chromeos |
OLD | NEW |