Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: chrome/browser/chromeos/login/users/mock_user_manager.cc

Issue 2637843002: Migrate base::TaskRunner from Closure to OnceClosure (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 base::Closure task, 16 base::OnceClosure task,
17 base::TimeDelta delay) override { 17 base::TimeDelta delay) override {
18 std::move(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
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc ('k') | chrome/browser/memory/tab_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698