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/mock_user_manager.h" | 5 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" |
6 | 6 |
7 #include "base/task_runner.h" | 7 #include "base/task_runner.h" |
8 #include "chrome/browser/chromeos/login/users/fake_supervised_user_manager.h" | 8 #include "chrome/browser/chromeos/login/users/fake_supervised_user_manager.h" |
9 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 9 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 class FakeTaskRunner : public base::TaskRunner { | 13 class FakeTaskRunner : public base::TaskRunner { |
14 public: | 14 public: |
15 bool PostDelayedTask(const tracked_objects::Location& from_here, | 15 bool PostDelayedTask(const tracked_objects::Location& from_here, |
16 const base::Closure& task, | 16 base::Closure task, |
17 base::TimeDelta delay) override { | 17 base::TimeDelta delay) override { |
18 task.Run(); | 18 std::move(task).Run(); |
19 return true; | 19 return true; |
20 } | 20 } |
21 bool RunsTasksOnCurrentThread() const override { return true; } | 21 bool RunsTasksOnCurrentThread() const override { return true; } |
22 | 22 |
23 protected: | 23 protected: |
24 ~FakeTaskRunner() override {} | 24 ~FakeTaskRunner() override {} |
25 }; | 25 }; |
26 | 26 |
27 } // namespace | 27 } // namespace |
28 | 28 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 bool MockUserManager::ShouldReportUser(const std::string& user_id) const { | 136 bool MockUserManager::ShouldReportUser(const std::string& user_id) const { |
137 for (auto* user : user_list_) { | 137 for (auto* user : user_list_) { |
138 if (user->GetAccountId().GetUserEmail() == user_id) | 138 if (user->GetAccountId().GetUserEmail() == user_id) |
139 return user->IsAffiliated(); | 139 return user->IsAffiliated(); |
140 } | 140 } |
141 NOTREACHED(); | 141 NOTREACHED(); |
142 return false; | 142 return false; |
143 } | 143 } |
144 | 144 |
145 } // namespace chromeos | 145 } // namespace chromeos |
OLD | NEW |