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

Unified Diff: trunk/src/sync/engine/syncer.h

Issue 23658030: Revert 222154 "sync: Gracefully handle very early shutdown" (Closed) Base URL: svn://svn.chromium.org/chrome/
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/sync/engine/sync_scheduler_unittest.cc ('k') | trunk/src/sync/engine/syncer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/sync/engine/syncer.h
===================================================================
--- trunk/src/sync/engine/syncer.h (revision 222204)
+++ trunk/src/sync/engine/syncer.h (working copy)
@@ -21,8 +21,6 @@
namespace syncer {
-class CancelationSignal;
-
// A Syncer provides a control interface for driving the individual steps
// of the sync cycle. Each cycle (hopefully) moves the client into closer
// synchronization with the server. The individual steps are modeled
@@ -37,10 +35,13 @@
public:
typedef std::vector<int64> UnsyncedMetaHandles;
- Syncer(CancelationSignal* cancelation_signal);
+ Syncer();
virtual ~Syncer();
+ // Called by other threads to tell the syncer to stop what it's doing
+ // and return early from SyncShare, if possible.
bool ExitRequested();
+ void RequestEarlyExit();
// Fetches and applies updates, resolves conflicts and commits local changes
// for |request_types| as necessary until client and server states are in
@@ -78,7 +79,8 @@
sessions::SyncSession* session,
sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source);
- syncer::CancelationSignal* const cancelation_signal_;
+ bool early_exit_requested_;
+ base::Lock early_exit_requested_lock_;
friend class SyncerTest;
FRIEND_TEST_ALL_PREFIXES(SyncerTest, NameClashWithResolver);
« no previous file with comments | « trunk/src/sync/engine/sync_scheduler_unittest.cc ('k') | trunk/src/sync/engine/syncer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698