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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_registrar.h

Issue 130193002: sync: Consistently refcount ModelSafeWorkers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix standalone sync client Created 6 years, 11 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 | Annotate | Revision Log
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 CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_REGISTRAR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_REGISTRAR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_REGISTRAR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_REGISTRAR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 // SyncManager::ChangeDelegate implementation. May be called from 103 // SyncManager::ChangeDelegate implementation. May be called from
104 // any thread. 104 // any thread.
105 virtual void OnChangesApplied( 105 virtual void OnChangesApplied(
106 syncer::ModelType model_type, 106 syncer::ModelType model_type,
107 int64 model_version, 107 int64 model_version,
108 const syncer::BaseTransaction* trans, 108 const syncer::BaseTransaction* trans,
109 const syncer::ImmutableChangeRecordList& changes) OVERRIDE; 109 const syncer::ImmutableChangeRecordList& changes) OVERRIDE;
110 virtual void OnChangesComplete(syncer::ModelType model_type) OVERRIDE; 110 virtual void OnChangesComplete(syncer::ModelType model_type) OVERRIDE;
111 111
112 void GetWorkers(std::vector<syncer::ModelSafeWorker*>* out); 112 void GetWorkers(std::vector<scoped_refptr<syncer::ModelSafeWorker> >* out);
113 void GetModelSafeRoutingInfo(syncer::ModelSafeRoutingInfo* out); 113 void GetModelSafeRoutingInfo(syncer::ModelSafeRoutingInfo* out);
114 114
115 // syncer::WorkerLoopDestructionObserver implementation. 115 // syncer::WorkerLoopDestructionObserver implementation.
116 virtual void OnWorkerLoopDestroyed(syncer::ModelSafeGroup group) OVERRIDE; 116 virtual void OnWorkerLoopDestroyed(syncer::ModelSafeGroup group) OVERRIDE;
117 117
118 // Release ownership of |sync_thread_|. Called when sync is disabled. 118 // Release ownership of |sync_thread_|. Called when sync is disabled.
119 scoped_ptr<base::Thread> ReleaseSyncThread(); 119 scoped_ptr<base::Thread> ReleaseSyncThread();
120 120
121 // Unregister workers from loop destruction observation. 121 // Unregister workers from loop destruction observation.
122 void Shutdown(); 122 void Shutdown();
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // e.g. Shutdown() depends on |lock_|, SyncManager::Init() depends on 185 // e.g. Shutdown() depends on |lock_|, SyncManager::Init() depends on
186 // workers, etc. 186 // workers, etc.
187 scoped_ptr<base::Thread> sync_thread_; 187 scoped_ptr<base::Thread> sync_thread_;
188 188
189 DISALLOW_COPY_AND_ASSIGN(SyncBackendRegistrar); 189 DISALLOW_COPY_AND_ASSIGN(SyncBackendRegistrar);
190 }; 190 };
191 191
192 } // namespace browser_sync 192 } // namespace browser_sync
193 193
194 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_REGISTRAR_H_ 194 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_REGISTRAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl.cc ('k') | chrome/browser/sync/glue/sync_backend_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698