diff options
author | haitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-10 23:02:49 +0000 |
---|---|---|
committer | haitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-10 23:02:49 +0000 |
commit | 923cbf2ab49b8a26806e31266a59a6f8a90fa015 (patch) | |
tree | 3ef61c7532aec1902d45be01be1fe0df1a48e09b /sync/test/engine | |
parent | 62167c1b6c2777d451f4b92eef4e5ddabdbbfce4 (diff) | |
download | chromium_src-923cbf2ab49b8a26806e31266a59a6f8a90fa015.zip chromium_src-923cbf2ab49b8a26806e31266a59a6f8a90fa015.tar.gz chromium_src-923cbf2ab49b8a26806e31266a59a6f8a90fa015.tar.bz2 |
Lock-free shutdown of profile sync service. Changes include:
* Disconnect non-frontend processor/associator to stop accessing directory
so that sync backend can be shut down without waiting.
* Change non-frontend controller so that creation/destruction of
processor/associator doesn't depend on valid controller. So
scoped wait on stopping controller can be removed.
* Move sync thread to PSS. It's created when starting first backend and
destroyed on last browser thread.
BUG=19757
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210333
Review URL: https://chromiumcodereview.appspot.com/16770005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210955 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/test/engine')
-rw-r--r-- | sync/test/engine/fake_sync_scheduler.cc | 6 | ||||
-rw-r--r-- | sync/test/engine/fake_sync_scheduler.h | 5 |
2 files changed, 3 insertions, 8 deletions
diff --git a/sync/test/engine/fake_sync_scheduler.cc b/sync/test/engine/fake_sync_scheduler.cc index 200edb0..585248e 100644 --- a/sync/test/engine/fake_sync_scheduler.cc +++ b/sync/test/engine/fake_sync_scheduler.cc @@ -6,16 +6,14 @@ namespace syncer { -FakeSyncScheduler::FakeSyncScheduler() - : created_on_loop_(base::MessageLoop::current()) {} +FakeSyncScheduler::FakeSyncScheduler() {} FakeSyncScheduler::~FakeSyncScheduler() {} void FakeSyncScheduler::Start(Mode mode) { } -void FakeSyncScheduler::RequestStop(const base::Closure& callback) { - created_on_loop_->PostTask(FROM_HERE, callback); +void FakeSyncScheduler::RequestStop() { } void FakeSyncScheduler::ScheduleLocalNudge( diff --git a/sync/test/engine/fake_sync_scheduler.h b/sync/test/engine/fake_sync_scheduler.h index 96805f5..f12e1df 100644 --- a/sync/test/engine/fake_sync_scheduler.h +++ b/sync/test/engine/fake_sync_scheduler.h @@ -20,7 +20,7 @@ class FakeSyncScheduler : public SyncScheduler { virtual ~FakeSyncScheduler(); virtual void Start(Mode mode) OVERRIDE; - virtual void RequestStop(const base::Closure& callback) OVERRIDE; + virtual void RequestStop() OVERRIDE; virtual void ScheduleLocalNudge( const base::TimeDelta& desired_delay, ModelTypeSet types, @@ -58,9 +58,6 @@ class FakeSyncScheduler : public SyncScheduler { virtual void OnShouldStopSyncingPermanently() OVERRIDE; virtual void OnSyncProtocolError( const sessions::SyncSessionSnapshot& snapshot) OVERRIDE; - - private: - base::MessageLoop* const created_on_loop_; }; } // namespace syncer |