summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/sync_manager_impl.h
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-23 23:28:46 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-23 23:28:46 +0000
commit3d4fde10da1c443a9128023977fc819d26798071 (patch)
tree8ade5d2e791f4c5aa342ff51f906e773497b6e72 /sync/internal_api/sync_manager_impl.h
parent026c0d11c7c75963ecf09e9a070c82985a6de1b9 (diff)
downloadchromium_src-3d4fde10da1c443a9128023977fc819d26798071.zip
chromium_src-3d4fde10da1c443a9128023977fc819d26798071.tar.gz
chromium_src-3d4fde10da1c443a9128023977fc819d26798071.tar.bz2
sync: Init backend without UI thread task
Remove the part of sync backend initialize flow that posts a task to the UI thread. The only part of this task that could not easily be moved on to the sync thread or defered for later was the setting of the initialization_state_ flag. However, as of r224014 that flag is no longer useful, so the refactoring can proceed. Replace the initialization_state_ variable with a bool. The code no longer requires a set of enum values to represent the backend's initialization state. This change broke the TestProfileSyncService pretty badly. That test class was fixed by moving around some code in order to allow us to inject testable hooks into SyncManager. BUG=295806 Review URL: https://codereview.chromium.org/23698015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230550 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/sync_manager_impl.h')
-rw-r--r--sync/internal_api/sync_manager_impl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h
index 2387690..5d5cfaa 100644
--- a/sync/internal_api/sync_manager_impl.h
+++ b/sync/internal_api/sync_manager_impl.h
@@ -180,6 +180,11 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl :
bool GetHasInvalidAuthTokenForTest() const;
+ protected:
+ // Helper functions. Virtual for testing.
+ virtual void NotifyInitializationSuccess();
+ virtual void NotifyInitializationFailure();
+
private:
friend class SyncManagerTest;
FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, NudgeDelayTest);