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

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

Issue 9959086: Add probability of culling if sync is enabled to https://chromiumcodereview.appspot.com/9585020/ In… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comment 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 0c388491a1b62afd54b3510f5b9b91811e6011a0..f13873d7eecde115edd4f87e70a59a3a4651fb1b 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 too old to be
+ // 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_;
« no previous file with comments | « chrome/browser/sync/profile_sync_service_autofill_unittest.cc ('k') | chrome/browser/webdata/autocomplete_syncable_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698