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

Side by Side Diff: components/sync/test/engine/fake_model_worker.h

Issue 2942773002: Task Scheduler API migration: change BrowserThreadModelWorker to SequencedModelWorker (Closed)
Patch Set: Updated more comments to reflect thread -> sequence migration. Created 3 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef COMPONENTS_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_ 5 #ifndef COMPONENTS_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
6 #define COMPONENTS_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_ 6 #define COMPONENTS_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "components/sync/base/syncer_error.h" 10 #include "components/sync/base/syncer_error.h"
11 #include "components/sync/engine/model_safe_worker.h" 11 #include "components/sync/engine/model_safe_worker.h"
12 12
13 namespace syncer { 13 namespace syncer {
14 14
15 // Fake implementation of ModelSafeWorker that does work on the 15 // Fake implementation of ModelSafeWorker that does work on the
16 // current thread regardless of the group. 16 // current thread regardless of the group.
17 class FakeModelWorker : public ModelSafeWorker { 17 class FakeModelWorker : public ModelSafeWorker {
18 public: 18 public:
19 explicit FakeModelWorker(ModelSafeGroup group); 19 explicit FakeModelWorker(ModelSafeGroup group);
20 20
21 // ModelSafeWorker implementation. 21 // ModelSafeWorker implementation.
22 ModelSafeGroup GetModelSafeGroup() override; 22 ModelSafeGroup GetModelSafeGroup() override;
23 bool IsOnModelThread() override; 23 bool IsOnModelSequence() override;
24 24
25 private: 25 private:
26 ~FakeModelWorker() override; 26 ~FakeModelWorker() override;
27 27
28 void ScheduleWork(base::OnceClosure work) override; 28 void ScheduleWork(base::OnceClosure work) override;
29 29
30 const ModelSafeGroup group_; 30 const ModelSafeGroup group_;
31 base::ThreadChecker thread_checker_; 31 base::ThreadChecker thread_checker_;
32 32
33 DISALLOW_COPY_AND_ASSIGN(FakeModelWorker); 33 DISALLOW_COPY_AND_ASSIGN(FakeModelWorker);
34 }; 34 };
35 35
36 } // namespace syncer 36 } // namespace syncer
37 37
38 #endif // COMPONENTS_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_ 38 #endif // COMPONENTS_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
OLDNEW
« no previous file with comments | « components/sync/engine/ui_model_worker.cc ('k') | components/sync/test/engine/fake_model_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698