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

Side by Side Diff: components/sync/driver/sync_client.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 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 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_
6 #define COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ 6 #define COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Returns a weak pointer to the ModelTypeSyncBridge specified by |type|. Weak 97 // Returns a weak pointer to the ModelTypeSyncBridge specified by |type|. Weak
98 // pointer may be unset if service is already destroyed. 98 // pointer may be unset if service is already destroyed.
99 // Note: Should only be dereferenced from the model type thread. 99 // Note: Should only be dereferenced from the model type thread.
100 virtual base::WeakPtr<ModelTypeSyncBridge> GetSyncBridgeForModelType( 100 virtual base::WeakPtr<ModelTypeSyncBridge> GetSyncBridgeForModelType(
101 ModelType type) = 0; 101 ModelType type) = 0;
102 102
103 // Creates and returns a new ModelSafeWorker for the group, or null if one 103 // Creates and returns a new ModelSafeWorker for the group, or null if one
104 // cannot be created. 104 // cannot be created.
105 // TODO(maxbogue): Move this inside SyncApiComponentFactory. 105 // TODO(maxbogue): Move this inside SyncApiComponentFactory.
106 virtual scoped_refptr<ModelSafeWorker> CreateModelWorkerForGroup( 106 virtual scoped_refptr<ModelSafeWorker> CreateModelWorkerForGroup(
107 ModelSafeGroup group, 107 ModelSafeGroup group) = 0;
108 WorkerLoopDestructionObserver* observer) = 0;
109 108
110 // Returns the current SyncApiComponentFactory instance. 109 // Returns the current SyncApiComponentFactory instance.
111 virtual SyncApiComponentFactory* GetSyncApiComponentFactory() = 0; 110 virtual SyncApiComponentFactory* GetSyncApiComponentFactory() = 0;
112 111
113 private: 112 private:
114 DISALLOW_COPY_AND_ASSIGN(SyncClient); 113 DISALLOW_COPY_AND_ASSIGN(SyncClient);
115 }; 114 };
116 115
117 } // namespace syncer 116 } // namespace syncer
118 117
119 #endif // COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ 118 #endif // COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_
OLDNEW
« no previous file with comments | « components/sync/driver/glue/ui_model_worker_unittest.cc ('k') | components/sync/engine/model_safe_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698