summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-24 04:20:26 +0000
committeratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-24 04:20:26 +0000
commitd68c5f29952beb31b969fd6320ab1955feab29d2 (patch)
treef201852db188072bdfd06e55f6bbc68b85ce9914
parent9d58a450c4447ce363c9272a04454776590f9814 (diff)
downloadchromium_src-d68c5f29952beb31b969fd6320ab1955feab29d2.zip
chromium_src-d68c5f29952beb31b969fd6320ab1955feab29d2.tar.gz
chromium_src-d68c5f29952beb31b969fd6320ab1955feab29d2.tar.bz2
Do not configure data types until setup_in_progress_ == false
BUG=144055 Review URL: https://chromiumcodereview.appspot.com/10827466 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153150 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sync/profile_sync_service.cc8
-rw-r--r--chrome/browser/sync/profile_sync_service_harness.cc6
2 files changed, 11 insertions, 3 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index ce354d5..ce621d3 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1331,6 +1331,14 @@ SyncBackendHost* ProfileSyncService::GetBackendForTest() {
}
void ProfileSyncService::ConfigureDataTypeManager() {
+ // Don't configure datatypes if the setup UI is still on the screen - this
+ // is to help multi-screen setting UIs (like iOS) where they don't want to
+ // start syncing data until the user is done configuring encryption options,
+ // etc. ReconfigureDatatypeManager() will get called again once the UI calls
+ // SetSetupInProgress(false).
+ if (setup_in_progress_)
+ return;
+
bool restart = false;
if (!data_type_manager_.get()) {
restart = true;
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index 3287c49..f03b25c 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -196,6 +196,9 @@ bool ProfileSyncServiceHarness::SetupSync(
synced_datatypes.Equals(syncer::ModelTypeSet::All());
service()->OnUserChoseDatatypes(sync_everything, synced_datatypes);
+ // Notify ProfileSyncService that we are done with configuration.
+ service_->SetSetupInProgress(false);
+
// Subscribe sync client to notifications from the backend migrator
// (possible only after choosing data types).
if (!TryListeningToMigrationEvents()) {
@@ -238,9 +241,6 @@ bool ProfileSyncServiceHarness::SetupSync(
return false;
}
- // Notify ProfileSyncService that we are done with configuration.
- service_->SetSetupInProgress(false);
-
// Indicate to the browser that sync setup is complete.
service()->SetSyncSetupCompleted();