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

Side by Side Diff: chrome/browser/chromeos/login/users/fake_chrome_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 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 19 matching lines...) Expand all
30 class FakeTaskRunner : public base::TaskRunner { 30 class FakeTaskRunner : public base::TaskRunner {
31 public: 31 public:
32 FakeTaskRunner() = default; 32 FakeTaskRunner() = default;
33 33
34 protected: 34 protected:
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::Closure 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 RunsTasksOnCurrentThread() 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
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 if (active_account_id_.is_valid()) { 631 if (active_account_id_.is_valid()) {
632 for (auto* user : users_) { 632 for (auto* user : users_) {
633 if (user->GetAccountId() == active_account_id_) 633 if (user->GetAccountId() == active_account_id_)
634 return user; 634 return user;
635 } 635 }
636 } 636 }
637 return users_[0]; 637 return users_[0];
638 } 638 }
639 639
640 } // namespace chromeos 640 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/chromeos/login/users/mock_user_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698