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

Side by Side Diff: components/user_manager/fake_user_manager.cc

Issue 2122543002: Replace Closure in TaskRunner::PostTask with OneShotCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@07_oneshot
Patch Set: fix Created 4 years, 3 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
« no previous file with comments | « components/timers/alarm_timer_chromeos.cc ('k') | content/browser/browser_thread_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/user_manager/fake_user_manager.h" 5 #include "components/user_manager/fake_user_manager.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "base/task_runner.h" 10 #include "base/task_runner.h"
11 #include "chromeos/chromeos_switches.h" 11 #include "chromeos/chromeos_switches.h"
12 #include "chromeos/login/user_names.h" 12 #include "chromeos/login/user_names.h"
13 #include "components/user_manager/user_type.h" 13 #include "components/user_manager/user_type.h"
14 14
15 namespace { 15 namespace {
16 16
17 class FakeTaskRunner : public base::TaskRunner { 17 class FakeTaskRunner : public base::TaskRunner {
18 public: 18 public:
19 bool PostDelayedTask(const tracked_objects::Location& from_here, 19 bool PostDelayedTask(const tracked_objects::Location& from_here,
20 const base::Closure& task, 20 base::OnceClosure task,
21 base::TimeDelta delay) override { 21 base::TimeDelta delay) override {
22 task.Run(); 22 std::move(task).Run();
23 return true; 23 return true;
24 } 24 }
25 bool RunsTasksOnCurrentThread() const override { return true; } 25 bool RunsTasksOnCurrentThread() const override { return true; }
26 26
27 protected: 27 protected:
28 ~FakeTaskRunner() override {} 28 ~FakeTaskRunner() override {}
29 }; 29 };
30 30
31 } // namespace 31 } // namespace
32 32
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 NOTIMPLEMENTED(); 353 NOTIMPLEMENTED();
354 return; 354 return;
355 } 355 }
356 356
357 bool FakeUserManager::IsValidDefaultUserImageId(int image_index) const { 357 bool FakeUserManager::IsValidDefaultUserImageId(int image_index) const {
358 NOTIMPLEMENTED(); 358 NOTIMPLEMENTED();
359 return false; 359 return false;
360 } 360 }
361 361
362 } // namespace user_manager 362 } // namespace user_manager
OLDNEW
« no previous file with comments | « components/timers/alarm_timer_chromeos.cc ('k') | content/browser/browser_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698