Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6669)

Unified Diff: chrome/browser/webdata/autocomplete_syncable_service.h

Issue 9585020: Cull autofill entries older than 60 days. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: if (!RemoveFormElementForID(pair_id)) Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/webdata/autocomplete_syncable_service.h
diff --git a/chrome/browser/webdata/autocomplete_syncable_service.h b/chrome/browser/webdata/autocomplete_syncable_service.h
index 963a1ad6e1fe1f6e08da4bf29f21918ee4444d4a..20f9b1e43d5fa3c702493a8a5e0783c3b85f7071 100644
--- a/chrome/browser/webdata/autocomplete_syncable_service.h
+++ b/chrome/browser/webdata/autocomplete_syncable_service.h
@@ -6,6 +6,7 @@
#pragma once
#include <map>
+#include <set>
#include <string>
#include <utility>
#include <vector>
@@ -93,9 +94,15 @@ class AutocompleteSyncableService
AutocompleteEntryMap;
// Creates or updates an autocomplete entry based on |data|.
+ // |data| - an entry for sync.
+ // |loaded_data| - entries that were loaded from local storage.
+ // |new_entries| - entries that came from the sync.
+ // |ignored_entries| - entries that came from the sync, but to old to be
Ilya Sherman 2012/03/23 22:44:45 nit: "to old" -> "too old"
GeorgeY 2012/03/26 19:59:10 Done.
+ // stored and immediately discarded.
void CreateOrUpdateEntry(const SyncData& data,
AutocompleteEntryMap* loaded_data,
- std::vector<AutofillEntry>* bundle);
+ std::vector<AutofillEntry>* new_entries,
+ std::vector<AutofillEntry>* ignored_entries);
// Writes |entry| data into supplied |autofill_specifics|.
static void WriteAutofillEntry(const AutofillEntry& entry,
@@ -118,6 +125,9 @@ class AutocompleteSyncableService
sync_processor_.reset(sync_processor);
}
+ // Ignore deletions of the following keys as they were never synced.
+ std::set<AutofillKey> keys_to_ignore_;
+
// Lifetime of AutocompleteSyncableService object is shorter than
// |web_data_service_| passed to it.
WebDataService* web_data_service_;

Powered by Google App Engine
This is Rietveld 408576698