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

Side by Side Diff: sync/internal_api/public/engine/model_safe_worker.h

Issue 23463033: Release password store on UI loop when worker is stopped so that password (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « chrome/browser/sync/glue/password_model_worker.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_
6 #define SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // working loop to stop observing loop destruction and invoke 76 // working loop to stop observing loop destruction and invoke
77 // |unregister_done_callback|. 77 // |unregister_done_callback|.
78 virtual void UnregisterForLoopDestruction( 78 virtual void UnregisterForLoopDestruction(
79 base::Callback<void(ModelSafeGroup)> unregister_done_callback); 79 base::Callback<void(ModelSafeGroup)> unregister_done_callback);
80 80
81 // If not stopped, call DoWorkAndWaitUntilDoneImpl() to do work. Otherwise 81 // If not stopped, call DoWorkAndWaitUntilDoneImpl() to do work. Otherwise
82 // return CANNOT_DO_WORK. 82 // return CANNOT_DO_WORK.
83 SyncerError DoWorkAndWaitUntilDone(const WorkCallback& work); 83 SyncerError DoWorkAndWaitUntilDone(const WorkCallback& work);
84 84
85 // Soft stop worker by setting stopped_ flag. Called when sync is disabled 85 // Soft stop worker by setting stopped_ flag. Called when sync is disabled
86 // or browser is shutting down. 86 // or browser is shutting down. Called on UI loop.
87 void RequestStop(); 87 virtual void RequestStop();
88 88
89 virtual ModelSafeGroup GetModelSafeGroup() = 0; 89 virtual ModelSafeGroup GetModelSafeGroup() = 0;
90 90
91 // MessageLoop::DestructionObserver implementation. 91 // MessageLoop::DestructionObserver implementation.
92 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; 92 virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
93 93
94 protected: 94 protected:
95 friend class base::RefCountedThreadSafe<ModelSafeWorker>; 95 friend class base::RefCountedThreadSafe<ModelSafeWorker>;
96 96
97 explicit ModelSafeWorker(WorkerLoopDestructionObserver* observer); 97 explicit ModelSafeWorker(WorkerLoopDestructionObserver* observer);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 SYNC_EXPORT ModelTypeSet GetRoutingInfoTypes( 151 SYNC_EXPORT ModelTypeSet GetRoutingInfoTypes(
152 const ModelSafeRoutingInfo& routing_info); 152 const ModelSafeRoutingInfo& routing_info);
153 153
154 SYNC_EXPORT ModelSafeGroup GetGroupForModelType( 154 SYNC_EXPORT ModelSafeGroup GetGroupForModelType(
155 const ModelType type, 155 const ModelType type,
156 const ModelSafeRoutingInfo& routes); 156 const ModelSafeRoutingInfo& routes);
157 157
158 } // namespace syncer 158 } // namespace syncer
159 159
160 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ 160 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/password_model_worker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698