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

Unified Diff: chrome/browser/sync/syncable/model_type.cc

Issue 4683003: Sending the proto files for review to unblcok the server team Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 10 years, 1 month 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 | « chrome/browser/sync/syncable/model_type.h ('k') | chrome/browser/sync/syncable/syncable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/syncable/model_type.cc
diff --git a/chrome/browser/sync/syncable/model_type.cc b/chrome/browser/sync/syncable/model_type.cc
index 5a06be84d43d53fd87f7a1e33b421bb636c1f3f5..88cc0b3f94236790f466511949e6b2944308a82f 100644
--- a/chrome/browser/sync/syncable/model_type.cc
+++ b/chrome/browser/sync/syncable/model_type.cc
@@ -34,6 +34,9 @@ void AddDefaultExtensionValue(syncable::ModelType datatype,
case AUTOFILL:
specifics->MutableExtension(sync_pb::autofill);
break;
+ case AUTOFILL_PROFILE:
+ specifics->MutableExtension(sync_pb::autofill_profile);
+ break;
case THEMES:
specifics->MutableExtension(sync_pb::theme);
break;
@@ -101,6 +104,9 @@ ModelType GetModelTypeFromSpecifics(const sync_pb::EntitySpecifics& specifics) {
if (specifics.HasExtension(sync_pb::autofill))
return AUTOFILL;
+ if (specifics.HasExtension(sync_pb::autofill_profile))
+ return AUTOFILL_PROFILE;
+
if (specifics.HasExtension(sync_pb::theme))
return THEMES;
@@ -163,6 +169,8 @@ const char kExtensionNotificationType[] = "EXTENSION";
const char kNigoriNotificationType[] = "NIGORI";
const char kAppNotificationType[] = "APP";
const char kSessionNotificationType[] = "SESSION";
+// [TODO] talk to akalin to make sure this is what I understand this to be.
+const char kAutofillProfileType[] = "AUTOFILL";
// TODO(akalin): This is a hack to make new sync data types work with
// server-issued notifications. Remove this when it's not needed
// anymore.
@@ -202,6 +210,9 @@ bool RealModelTypeToNotificationType(ModelType model_type,
case SESSIONS:
*notification_type = kSessionNotificationType;
return true;
+ case AUTOFILL_PROFILE:
+ *notification_type = kAutofillProfileType;
+ return true;
// TODO(akalin): This is a hack to make new sync data types work with
// server-issued notifications. Remove this when it's not needed
// anymore.
@@ -247,8 +258,7 @@ bool NotificationTypeToRealModelType(const std::string& notification_type,
} else if (notification_type == kSessionNotificationType) {
*model_type = SESSIONS;
return true;
- }
- else if (notification_type == kUnknownNotificationType) {
+ } else if (notification_type == kUnknownNotificationType) {
// TODO(akalin): This is a hack to make new sync data types work with
// server-issued notifications. Remove this when it's not needed
// anymore.
« no previous file with comments | « chrome/browser/sync/syncable/model_type.h ('k') | chrome/browser/sync/syncable/syncable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698