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

Side by Side Diff: components/sync/engine/passive_model_worker.h

Issue 2471183003: Do not observe MessageLoop destruction from ModelSafeWorker. (Closed)
Patch Set: CR maxbogue #23 Created 4 years, 1 month 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_ENGINE_PASSIVE_MODEL_WORKER_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_
6 #define COMPONENTS_SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_ 6 #define COMPONENTS_SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_
7 7
8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 8 #include "base/macros.h"
10 #include "components/sync/base/syncer_error.h" 9 #include "components/sync/base/syncer_error.h"
11 #include "components/sync/engine/model_safe_worker.h" 10 #include "components/sync/engine/model_safe_worker.h"
12 11
13 namespace syncer { 12 namespace syncer {
14 13
15 // Implementation of ModelSafeWorker for passive types. All work is 14 // Implementation of ModelSafeWorker for passive types. All work is
16 // done on the same thread DoWorkAndWaitUntilDone (i.e., the sync 15 // done on the same thread DoWorkAndWaitUntilDone (i.e., the sync
17 // thread). 16 // thread).
18 class PassiveModelWorker : public ModelSafeWorker { 17 class PassiveModelWorker : public ModelSafeWorker {
19 public: 18 public:
20 explicit PassiveModelWorker(WorkerLoopDestructionObserver* observer); 19 PassiveModelWorker();
21 20
22 // ModelSafeWorker implementation. Called on the sync thread. 21 // ModelSafeWorker implementation. Called on the sync thread.
23 void RegisterForLoopDestruction() override;
24 ModelSafeGroup GetModelSafeGroup() override; 22 ModelSafeGroup GetModelSafeGroup() override;
25 23
26 protected: 24 protected:
27 SyncerError DoWorkAndWaitUntilDoneImpl(const WorkCallback& work) override; 25 SyncerError DoWorkAndWaitUntilDoneImpl(const WorkCallback& work) override;
28 26
29 private: 27 private:
30 ~PassiveModelWorker() override; 28 ~PassiveModelWorker() override;
31 29
32 DISALLOW_COPY_AND_ASSIGN(PassiveModelWorker); 30 DISALLOW_COPY_AND_ASSIGN(PassiveModelWorker);
33 }; 31 };
34 32
35 } // namespace syncer 33 } // namespace syncer
36 34
37 #endif // COMPONENTS_SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_ 35 #endif // COMPONENTS_SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_
OLDNEW
« no previous file with comments | « components/sync/engine/model_safe_worker.cc ('k') | components/sync/engine/passive_model_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698