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

Unified Diff: components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc

Issue 2737023002: Update GetClientTag/GetStorageKey comments. (Closed)
Patch Set: Small phrasing change. Created 3 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: components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc
diff --git a/components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc b/components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc
index 589df1628afd352b8a5380537b414b7808359d6d..9ed914081904a0e634b7034eaaa590e134141bcb 100644
--- a/components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc
+++ b/components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc
@@ -458,6 +458,9 @@ void AutocompleteSyncBridge::LoadMetadata() {
std::string AutocompleteSyncBridge::GetClientTag(
const EntityData& entity_data) {
DCHECK(entity_data.specifics.has_autofill());
+ // Must have the format "autofill_entry|$name|$value" where $name and $value
+ // are URL escaped. This is to maintain compatibility with the previous sync
+ // integration (Directory and SyncableService).
return std::string(kAutocompleteEntryNamespaceTag) +
EscapeIdentifiers(entity_data.specifics.autofill());
}
@@ -465,6 +468,9 @@ std::string AutocompleteSyncBridge::GetClientTag(
std::string AutocompleteSyncBridge::GetStorageKey(
const EntityData& entity_data) {
DCHECK(entity_data.specifics.has_autofill());
+ // Marginally more space efficient than GetClientTag() by omitting the
+ // kAutocompleteEntryNamespaceTag prefix and using protobuf serialization
+ // instead of URL escaping for Unicode characters.
const AutofillSpecifics specifics = entity_data.specifics.autofill();
return BuildSerializedStorageKey(specifics.name(), specifics.value());
}
« no previous file with comments | « components/autofill/core/browser/webdata/autocomplete_sync_bridge.h ('k') | components/sync/model/model_type_sync_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698