diff options
author | markusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-24 12:24:31 +0000 |
---|---|---|
committer | markusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-24 12:24:31 +0000 |
commit | 4c6260d4b8ad400a565c58e4aeacf4ef52ba59e8 (patch) | |
tree | a6e9c376374ab6ca11849b5b67d7dd552ab1a5fb /sync | |
parent | 3b0bc5ec00f099869826a3bd972ce23471b087e3 (diff) | |
download | chromium_src-4c6260d4b8ad400a565c58e4aeacf4ef52ba59e8.zip chromium_src-4c6260d4b8ad400a565c58e4aeacf4ef52ba59e8.tar.gz chromium_src-4c6260d4b8ad400a565c58e4aeacf4ef52ba59e8.tar.bz2 |
Revert 196116 "Sync: Turn on full history sync by default."
> Sync: Turn on full history sync by default.
>
> Full history sync (and history delete directives) were off by default,
> but turned on in M27 via an experiment. This meant that history from
> signed-in devices was not visible on chrome://history until the browser
> was restarted.
>
> This CL make full history sync enabled by default, but retains a
> command-line switch and about:flags option to disable it. It also
> removes the option to disable delete directives only, since that
> had the same effect as disabling full history sync.
>
> TBR=brettw@chromium.org
> BUG=233098
> TEST=Start up Chrome in a fresh profile, and sign in. Go to
> chrome://history and ensure that it says "Showing history from your
> signed-in devices" at the top of the history page.
>
> Review URL: https://chromiumcodereview.appspot.com/14344002
TBR=dubroy@chromium.org
Review URL: https://codereview.chromium.org/14387005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196124 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
-rw-r--r-- | sync/internal_api/public/util/experiments.h | 7 | ||||
-rw-r--r-- | sync/internal_api/sync_manager_impl.cc | 10 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sync/internal_api/public/util/experiments.h b/sync/internal_api/public/util/experiments.h index c4b7dd5..a3b874b 100644 --- a/sync/internal_api/public/util/experiments.h +++ b/sync/internal_api/public/util/experiments.h @@ -12,6 +12,8 @@ namespace syncer { const char kKeystoreEncryptionTag[] = "keystore_encryption"; const char kKeystoreEncryptionFlag[] = "sync-keystore-encryption"; const char kAutofillCullingTag[] = "autofill_culling"; +const char kFullHistorySyncTag[] = "history_delete_directives"; +const char kFullHistorySyncFlag[] = "full-history-sync"; const char kFaviconSyncTag[] = "favicon_sync"; const char kFaviconSyncFlag[] = "enable-sync-favicons"; @@ -19,12 +21,14 @@ const char kFaviconSyncFlag[] = "enable-sync-favicons"; struct Experiments { Experiments() : keystore_encryption(false), autofill_culling(false), + full_history_sync(false), favicon_sync(false), favicon_sync_limit(200) {} bool Matches(const Experiments& rhs) { return (keystore_encryption == rhs.keystore_encryption && autofill_culling == rhs.autofill_culling && + full_history_sync == rhs.full_history_sync && favicon_sync == rhs.favicon_sync && favicon_sync_limit == rhs.favicon_sync_limit); } @@ -35,6 +39,9 @@ struct Experiments { // Enable deletion of expired autofill entries (if autofill sync is enabled). bool autofill_culling; + // Enable full history sync (and history delete directives) for this client. + bool full_history_sync; + // Enable the favicons sync datatypes (favicon images and favicon tracking). bool favicon_sync; diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc index fcccff6..0f807bc 100644 --- a/sync/internal_api/sync_manager_impl.cc +++ b/sync/internal_api/sync_manager_impl.cc @@ -1366,6 +1366,16 @@ bool SyncManagerImpl::ReceivedExperiment(Experiments* experiments) { found_experiment = true; } + ReadNode full_history_sync_node(&trans); + if (full_history_sync_node.InitByClientTagLookup( + syncer::EXPERIMENTS, + syncer::kFullHistorySyncTag) == BaseNode::INIT_OK && + full_history_sync_node.GetExperimentsSpecifics(). + history_delete_directives().enabled()) { + experiments->full_history_sync = true; + found_experiment = true; + } + ReadNode favicon_sync_node(&trans); if (favicon_sync_node.InitByClientTagLookup( syncer::EXPERIMENTS, |