summaryrefslogtreecommitdiffstats
path: root/chrome/browser/webdata
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-11 04:21:32 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-11 04:21:32 +0000
commitf447e5d104fa5730b3f18711291ef83373fc0fea (patch)
treeaa404ab12b24a45da44c6a187f66af4ea1847c07 /chrome/browser/webdata
parentc0084dda2b7d6f6359f9991021d622bbc82a8bd6 (diff)
downloadchromium_src-f447e5d104fa5730b3f18711291ef83373fc0fea.zip
chromium_src-f447e5d104fa5730b3f18711291ef83373fc0fea.tar.gz
chromium_src-f447e5d104fa5730b3f18711291ef83373fc0fea.tar.bz2
[Autofill, Sync] Deprecate the Autofill culling experiment.
Culling has for a while now been enabled for all users, so might as well deprecate the experiment. BUG=none TEST=none R=zea@chromium.org Review URL: https://codereview.chromium.org/157023004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250336 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/webdata')
-rw-r--r--chrome/browser/webdata/autocomplete_syncable_service.cc34
-rw-r--r--chrome/browser/webdata/autocomplete_syncable_service.h9
2 files changed, 11 insertions, 32 deletions
diff --git a/chrome/browser/webdata/autocomplete_syncable_service.cc b/chrome/browser/webdata/autocomplete_syncable_service.cc
index 0b63f07..c18f0c2 100644
--- a/chrome/browser/webdata/autocomplete_syncable_service.cc
+++ b/chrome/browser/webdata/autocomplete_syncable_service.cc
@@ -92,8 +92,7 @@ void* UserDataKey() {
AutocompleteSyncableService::AutocompleteSyncableService(
AutofillWebDataBackend* webdata_backend)
: webdata_backend_(webdata_backend),
- scoped_observer_(this),
- cull_expired_entries_(false) {
+ scoped_observer_(this) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
DCHECK(webdata_backend_);
@@ -121,8 +120,7 @@ AutocompleteSyncableService* AutocompleteSyncableService::FromWebDataService(
AutocompleteSyncableService::AutocompleteSyncableService()
: webdata_backend_(NULL),
- scoped_observer_(this),
- cull_expired_entries_(false) {
+ scoped_observer_(this) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
}
@@ -190,14 +188,12 @@ syncer::SyncMergeResult AutocompleteSyncableService::MergeDataAndStartSyncing(
merge_result.set_error(
sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes));
- if (cull_expired_entries_) {
- // This will schedule a deletion operation on the DB thread, which will
- // trigger a notification to propagate the deletion to Sync.
- // NOTE: This must be called *after* the ProcessSyncChanges call above.
- // Otherwise, an item that Sync is not yet aware of might expire, causing a
- // Sync error when that item's deletion is propagated to Sync.
- webdata_backend_->RemoveExpiredFormElements();
- }
+ // This will schedule a deletion operation on the DB thread, which will
+ // trigger a notification to propagate the deletion to Sync.
+ // NOTE: This must be called *after* the ProcessSyncChanges call above.
+ // Otherwise, an item that Sync is not yet aware of might expire, causing a
+ // Sync error when that item's deletion is propagated to Sync.
+ webdata_backend_->RemoveExpiredFormElements();
return merge_result;
}
@@ -302,11 +298,9 @@ syncer::SyncError AutocompleteSyncableService::ProcessSyncChanges(
webdata_backend_->NotifyOfMultipleAutofillChanges();
- if (cull_expired_entries_) {
- // This will schedule a deletion operation on the DB thread, which will
- // trigger a notification to propagate the deletion to Sync.
- webdata_backend_->RemoveExpiredFormElements();
- }
+ // This will schedule a deletion operation on the DB thread, which will
+ // trigger a notification to propagate the deletion to Sync.
+ webdata_backend_->RemoveExpiredFormElements();
return list_processing_error;
}
@@ -469,12 +463,6 @@ void AutocompleteSyncableService::ActOnChanges(
}
}
-void AutocompleteSyncableService::UpdateCullSetting(
- bool cull_expired_entries) {
- DCHECK(CalledOnValidThread());
- cull_expired_entries_ = cull_expired_entries;
-}
-
syncer::SyncData AutocompleteSyncableService::CreateSyncData(
const AutofillEntry& entry) const {
sync_pb::EntitySpecifics autofill_specifics;
diff --git a/chrome/browser/webdata/autocomplete_syncable_service.h b/chrome/browser/webdata/autocomplete_syncable_service.h
index 94c8cd3..ecc7592 100644
--- a/chrome/browser/webdata/autocomplete_syncable_service.h
+++ b/chrome/browser/webdata/autocomplete_syncable_service.h
@@ -76,11 +76,6 @@ class AutocompleteSyncableService
virtual void AutofillEntriesChanged(
const autofill::AutofillChangeList& changes) OVERRIDE;
- // Called via sync to tell us if we should cull expired entries when merging
- // and/or processing sync changes.
- void UpdateCullSetting(bool cull_expired_entries);
- bool cull_expired_entries() const { return cull_expired_entries_; }
-
// Provides a StartSyncFlare to the SyncableService. See
// sync_start_util for more.
void InjectStartSyncFlare(
@@ -168,10 +163,6 @@ class AutocompleteSyncableService
// destroy it in StopSyncing().
scoped_ptr<syncer::SyncErrorFactory> error_handler_;
- // Whether we should cull expired autofill entries, can be updated by sync
- // via UpdateCullingSetting.
- bool cull_expired_entries_;
-
syncer::SyncableService::StartSyncFlare flare_;
DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncableService);