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

Side by Side 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: remove period Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « components/sync/protocol/sync.proto ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/sync/base/model_type.h" 5 #include "components/sync/base/model_type.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "components/sync/protocol/app_notification_specifics.pb.h" 12 #include "components/sync/protocol/app_notification_specifics.pb.h"
13 #include "components/sync/protocol/app_setting_specifics.pb.h" 13 #include "components/sync/protocol/app_setting_specifics.pb.h"
14 #include "components/sync/protocol/app_specifics.pb.h" 14 #include "components/sync/protocol/app_specifics.pb.h"
15 #include "components/sync/protocol/autofill_specifics.pb.h" 15 #include "components/sync/protocol/autofill_specifics.pb.h"
16 #include "components/sync/protocol/bookmark_specifics.pb.h" 16 #include "components/sync/protocol/bookmark_specifics.pb.h"
17 #include "components/sync/protocol/extension_setting_specifics.pb.h" 17 #include "components/sync/protocol/extension_setting_specifics.pb.h"
18 #include "components/sync/protocol/extension_specifics.pb.h" 18 #include "components/sync/protocol/extension_specifics.pb.h"
19 #include "components/sync/protocol/nigori_specifics.pb.h" 19 #include "components/sync/protocol/nigori_specifics.pb.h"
20 #include "components/sync/protocol/password_specifics.pb.h" 20 #include "components/sync/protocol/password_specifics.pb.h"
21 #include "components/sync/protocol/preference_specifics.pb.h" 21 #include "components/sync/protocol/preference_specifics.pb.h"
22 #include "components/sync/protocol/reading_list_specifics.pb.h"
22 #include "components/sync/protocol/search_engine_specifics.pb.h" 23 #include "components/sync/protocol/search_engine_specifics.pb.h"
23 #include "components/sync/protocol/session_specifics.pb.h" 24 #include "components/sync/protocol/session_specifics.pb.h"
24 #include "components/sync/protocol/sync.pb.h" 25 #include "components/sync/protocol/sync.pb.h"
25 #include "components/sync/protocol/theme_specifics.pb.h" 26 #include "components/sync/protocol/theme_specifics.pb.h"
26 #include "components/sync/protocol/typed_url_specifics.pb.h" 27 #include "components/sync/protocol/typed_url_specifics.pb.h"
27 #include "components/sync/syncable/syncable_proto_util.h" 28 #include "components/sync/syncable/syncable_proto_util.h"
28 29
29 namespace syncer { 30 namespace syncer {
30 31
31 struct ModelTypeInfo { 32 struct ModelTypeInfo {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 {SUPERVISED_USER_WHITELISTS, "MANAGED_USER_WHITELIST", 132 {SUPERVISED_USER_WHITELISTS, "MANAGED_USER_WHITELIST",
132 "managed_user_whitelists", "Managed User Whitelists", 133 "managed_user_whitelists", "Managed User Whitelists",
133 sync_pb::EntitySpecifics::kManagedUserWhitelistFieldNumber, 33}, 134 sync_pb::EntitySpecifics::kManagedUserWhitelistFieldNumber, 33},
134 {ARC_PACKAGE, "ARC_PACKAGE", "arc_package", "Arc Package", 135 {ARC_PACKAGE, "ARC_PACKAGE", "arc_package", "Arc Package",
135 sync_pb::EntitySpecifics::kArcPackageFieldNumber, 36}, 136 sync_pb::EntitySpecifics::kArcPackageFieldNumber, 36},
136 {PROXY_TABS, "", "", "Tabs", -1, 25}, 137 {PROXY_TABS, "", "", "Tabs", -1, 25},
137 {NIGORI, "NIGORI", "nigori", "Encryption keys", 138 {NIGORI, "NIGORI", "nigori", "Encryption keys",
138 sync_pb::EntitySpecifics::kNigoriFieldNumber, 17}, 139 sync_pb::EntitySpecifics::kNigoriFieldNumber, 17},
139 {EXPERIMENTS, "EXPERIMENTS", "experiments", "Experiments", 140 {EXPERIMENTS, "EXPERIMENTS", "experiments", "Experiments",
140 sync_pb::EntitySpecifics::kExperimentsFieldNumber, 19}, 141 sync_pb::EntitySpecifics::kExperimentsFieldNumber, 19},
142 {READING_LIST, "READING_LIST", "reading_list", "Reading List",
Patrick Noland 2016/08/29 17:01:05 Apologies for the driveby, but this struct literal
Olivier 2016/09/06 14:06:59 Done. Thanks
143 sync_pb::EntitySpecifics::kReadingListFieldNumber, 37},
141 }; 144 };
142 145
143 static_assert(arraysize(kModelTypeInfoMap) == MODEL_TYPE_COUNT, 146 static_assert(arraysize(kModelTypeInfoMap) == MODEL_TYPE_COUNT,
144 "kModelTypeInfoMap should have MODEL_TYPE_COUNT elements"); 147 "kModelTypeInfoMap should have MODEL_TYPE_COUNT elements");
145 148
146 // Notes: 149 // Notes:
147 // 1) This list must contain exactly the same elements as the set returned by 150 // 1) This list must contain exactly the same elements as the set returned by
148 // UserSelectableTypes(). 151 // UserSelectableTypes().
149 // 2) This list must be in the same order as the respective values in the 152 // 2) This list must be in the same order as the respective values in the
150 // ModelType enum. 153 // ModelType enum.
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 bool TypeSupportsHierarchy(ModelType model_type) { 751 bool TypeSupportsHierarchy(ModelType model_type) {
749 // TODO(stanisc): crbug/438313: Should this also include TOP_LEVEL_FOLDER? 752 // TODO(stanisc): crbug/438313: Should this also include TOP_LEVEL_FOLDER?
750 return model_type == BOOKMARKS; 753 return model_type == BOOKMARKS;
751 } 754 }
752 755
753 bool TypeSupportsOrdering(ModelType model_type) { 756 bool TypeSupportsOrdering(ModelType model_type) {
754 return model_type == BOOKMARKS; 757 return model_type == BOOKMARKS;
755 } 758 }
756 759
757 } // namespace syncer 760 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/protocol/sync.proto ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698