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

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

Issue 2241583003: Creating protobuf for reading list sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 15f7bd9fd79ccc90592a91fd9c94c224e26428b3..6443ce18b9cec90eda091542f0dcf2f561009f01 100644
--- a/components/sync/syncable/model_type.cc
+++ b/components/sync/syncable/model_type.cc
@@ -19,6 +19,7 @@
#include "components/sync/protocol/nigori_specifics.pb.h"
#include "components/sync/protocol/password_specifics.pb.h"
#include "components/sync/protocol/preference_specifics.pb.h"
+#include "components/sync/protocol/reading_list_specifics.pb.h"
#include "components/sync/protocol/search_engine_specifics.pb.h"
#include "components/sync/protocol/session_specifics.pb.h"
#include "components/sync/protocol/sync.pb.h"
@@ -135,6 +136,8 @@ const ModelTypeInfo kModelTypeInfoMap[] = {
sync_pb::EntitySpecifics::kArcPackageFieldNumber, 36},
{PRINTERS, "PRINTER", "printers", "Printers",
sync_pb::EntitySpecifics::kPrinterFieldNumber, 37},
+ {READING_LIST, "READING_LIST", "reading_list", "Reading List",
+ sync_pb::EntitySpecifics::kReadingListFieldNumber, 38},
{PROXY_TABS, "", "", "Tabs", -1, 25},
{NIGORI, "NIGORI", "nigori", "Encryption keys",
sync_pb::EntitySpecifics::kNigoriFieldNumber, 17},
@@ -156,7 +159,7 @@ const char* kUserSelectableDataTypeNames[] = {
};
static_assert(
- 38 == MODEL_TYPE_COUNT,
+ 39 == MODEL_TYPE_COUNT,
"update kUserSelectableDataTypeName to match UserSelectableTypes");
void AddDefaultFieldValue(ModelType datatype,
@@ -271,6 +274,9 @@ void AddDefaultFieldValue(ModelType datatype,
case WIFI_CREDENTIALS:
specifics->mutable_wifi_credential();
break;
+ case READING_LIST:
+ specifics->mutable_reading_list();
+ break;
default:
NOTREACHED() << "No known extension for model type.";
}
@@ -387,6 +393,9 @@ ModelType GetModelTypeFromSpecifics(const sync_pb::EntitySpecifics& specifics) {
if (specifics.has_app_notification())
return APP_NOTIFICATIONS;
+ if (specifics.has_reading_list())
+ return READING_LIST;
+
if (specifics.has_history_delete_directive())
return HISTORY_DELETE_DIRECTIVES;
« 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