From 6f99b280a55076d250e3c26170b86a6f0aba2baa Mon Sep 17 00:00:00 2001 From: "kinuko@chromium.org" Date: Mon, 8 Jul 2013 04:36:43 +0000 Subject: Revert 210333 "Lock-free shutdown of profile sync service. Chang..." Suspected to have introduced (flaky) SEGV crash in ProfileSyncServiceTypedUrlTest.IgnoreLocalhostURL http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20(1)/builds/28925/steps/unit_tests/logs/stdio http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20(dbg)(1)/builds/21682/steps/unit_tests/logs/IgnoreLocalhostURL http://build.chromium.org/p/chromium.win/builders/Win%207%20Tests%20x64%20%283%29/builds/7252/steps/unit_tests/logs/IgnoreLocalhostURL > 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 > > Review URL: https://chromiumcodereview.appspot.com/16770005 TBR=haitaol@chromium.org Review URL: https://codereview.chromium.org/18489004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210346 0039d316-1c4b-4281-b951-d872f2087c98 --- sync/engine/sync_scheduler.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sync/engine/sync_scheduler.h') diff --git a/sync/engine/sync_scheduler.h b/sync/engine/sync_scheduler.h index 1dd1018..8eb361e 100644 --- a/sync/engine/sync_scheduler.h +++ b/sync/engine/sync_scheduler.h @@ -79,7 +79,9 @@ class SYNC_EXPORT_PRIVATE SyncScheduler // cancel all scheduled tasks. This function can be called from any thread, // and should in fact be called from a thread that isn't the sync loop to // allow preempting ongoing sync cycles. - virtual void RequestStop() = 0; + // Invokes |callback| from the sync loop once syncer is idle and all tasks + // are cancelled. + virtual void RequestStop(const base::Closure& callback) = 0; // The meat and potatoes. All three of the following methods will post a // delayed task to attempt the actual nudge (see ScheduleNudgeImpl). -- cgit v1.1