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

Unified Diff: components/sync/model/model_type_sync_bridge.h

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
« no previous file with comments | « components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/model/model_type_sync_bridge.h
diff --git a/components/sync/model/model_type_sync_bridge.h b/components/sync/model/model_type_sync_bridge.h
index dd3793845cb081f72ebdaceadd1e74958a454f61..eaa5355fc3fe0bd95c033d36d26bd86d22fbdd48 100644
--- a/components/sync/model/model_type_sync_bridge.h
+++ b/components/sync/model/model_type_sync_bridge.h
@@ -88,9 +88,9 @@ class ModelTypeSyncBridge : public base::SupportsWeakPtr<ModelTypeSyncBridge> {
// that was/would have been generated in the SyncableService/Directory world
// for backward compatibility with pre-USS clients. The only time this
// theoretically needs to be called is on the creation of local data, however
- // it is also used to verify the hash of remote data. If a data type was never
- // launched pre-USS, then method does not need to be different from
- // GetStorageKey().
+ // it is also used to verify the hash of remote data. If a model type was
+ // never launched pre-USS, then method does not need to be different from
+ // GetStorageKey(). Only the hash of this value is kept.
virtual std::string GetClientTag(const EntityData& entity_data) = 0;
// Get or generate a storage key for |entity_data|. This will only ever be
@@ -98,7 +98,8 @@ class ModelTypeSyncBridge : public base::SupportsWeakPtr<ModelTypeSyncBridge> {
// provide their storage keys directly to Put instead of using this method.
// Theoretically this function doesn't need to be stable across multiple calls
// on the same or different clients, but to keep things simple, it probably
- // should be.
+ // should be. Storage keys are kept in memory at steady state, so each model
+ // type should strive to keep these keys as small as possible.
virtual std::string GetStorageKey(const EntityData& entity_data) = 0;
// Resolve a conflict between the client and server versions of data. They are
« no previous file with comments | « components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698