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

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

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: fixed build error and commments 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 24 matching lines...) Expand all
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 575 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

Powered by Google App Engine
This is Rietveld 408576698