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

Unified Diff: components/sync/syncable/model_type.cc

Issue 2306763002: Add PrinterSpecifics to the sync protos. (Closed)
Patch Set: PrintersSpecifics -> PrinterSpecifics Created 4 years, 3 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/sync/protocol/sync.proto ('k') | components/sync/syncable/model_type_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/model_type.cc
diff --git a/components/sync/syncable/model_type.cc b/components/sync/syncable/model_type.cc
index 51ba9ed857837c6dd715f8323baa8cea77c2e4ff..15f7bd9fd79ccc90592a91fd9c94c224e26428b3 100644
--- a/components/sync/syncable/model_type.cc
+++ b/components/sync/syncable/model_type.cc
@@ -133,6 +133,8 @@ const ModelTypeInfo kModelTypeInfoMap[] = {
sync_pb::EntitySpecifics::kManagedUserWhitelistFieldNumber, 33},
{ARC_PACKAGE, "ARC_PACKAGE", "arc_package", "Arc Package",
sync_pb::EntitySpecifics::kArcPackageFieldNumber, 36},
+ {PRINTERS, "PRINTER", "printers", "Printers",
+ sync_pb::EntitySpecifics::kPrinterFieldNumber, 37},
{PROXY_TABS, "", "", "Tabs", -1, 25},
{NIGORI, "NIGORI", "nigori", "Encryption keys",
sync_pb::EntitySpecifics::kNigoriFieldNumber, 17},
@@ -154,7 +156,7 @@ const char* kUserSelectableDataTypeNames[] = {
};
static_assert(
- 37 == MODEL_TYPE_COUNT,
+ 38 == MODEL_TYPE_COUNT,
"update kUserSelectableDataTypeName to match UserSelectableTypes");
void AddDefaultFieldValue(ModelType datatype,
@@ -236,6 +238,9 @@ void AddDefaultFieldValue(ModelType datatype,
case EXPERIMENTS:
specifics->mutable_experiments();
break;
+ case PRINTERS:
+ specifics->mutable_printer();
+ break;
case PRIORITY_PREFERENCES:
specifics->mutable_priority_preference();
break;
@@ -400,6 +405,9 @@ ModelType GetModelTypeFromSpecifics(const sync_pb::EntitySpecifics& specifics) {
if (specifics.has_priority_preference())
return PRIORITY_PREFERENCES;
+ if (specifics.has_printer())
+ return PRINTERS;
+
if (specifics.has_dictionary())
return DICTIONARY;
« no previous file with comments | « components/sync/protocol/sync.proto ('k') | components/sync/syncable/model_type_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698