diff options
author | dantasse@chromium.org <dantasse@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 23:42:59 +0000 |
---|---|---|
committer | dantasse@chromium.org <dantasse@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 23:42:59 +0000 |
commit | af0164c128ef614a882bed2d1ded27134c9cda54 (patch) | |
tree | 7ae207b2d841c98c5410adb66ab9658cdcd965e5 /chrome/browser | |
parent | 428caf008d98f93d3bcf4b93f566573b62e916ab (diff) | |
download | chromium_src-af0164c128ef614a882bed2d1ded27134c9cda54.zip chromium_src-af0164c128ef614a882bed2d1ded27134c9cda54.tar.gz chromium_src-af0164c128ef614a882bed2d1ded27134c9cda54.tar.bz2 |
Check the LSID before starting up a ProfileSyncService. This will stop memory leaks in tests. It will also stop us from starting Sync in Chromium OS UI tests.
BUG=32085,32084
TEST=none
Review URL: http://codereview.chromium.org/560033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/sync/profile_sync_service.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc index 0c4b922..77f8b6f 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -67,7 +67,11 @@ void ProfileSyncService::Initialize() { if (!profile()->GetPrefs()->GetBoolean(prefs::kSyncHasSetupCompleted)) { DisableForUser(); // Clean up in case of previous crash / setup abort. + // If the LSID is empty, we're in a UI test that is not testing sync + // behavior, so we don't want the sync service to start. + // profile()->GetRequestContext() also checks if this is in a test. if (browser_defaults::kBootstrapSyncAuthentication && + !GetLsidForAuthBootstraping().empty() && profile()->GetRequestContext()) StartUp(); // We always start sync for Chrome OS. } else { |