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

Side by Side Diff: components/sync/protocol/proto_old_value_conversions.h

Issue 2374223003: Sync MDP: reimplement value conversions ontop of visitors
Patch Set: Created 4 years, 2 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Keep this file in sync with the .proto files in this directory. 5 // Keep this file in sync with the .proto files in this directory.
6 6
7 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ 7 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_OLD_VALUE_CONVERSIONS_H_
8 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ 8 #define COMPONENTS_SYNC_PROTOCOL_PROTO_OLD_VALUE_CONVERSIONS_H_
9 9
10 #include <memory> 10 #include <memory>
11 11
12 namespace base { 12 namespace base {
13 class DictionaryValue; 13 class DictionaryValue;
14 } 14 }
15 15
16 namespace sync_pb { 16 namespace sync_pb {
17 class AppListSpecifics; 17 class AppListSpecifics;
18 class AppNotification; 18 class AppNotification;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Utility functions to convert sync protocol buffers to dictionaries. 87 // Utility functions to convert sync protocol buffers to dictionaries.
88 // Each protocol field is mapped to a key of the same name. Repeated 88 // Each protocol field is mapped to a key of the same name. Repeated
89 // fields are mapped to array values and sub-messages are mapped to 89 // fields are mapped to array values and sub-messages are mapped to
90 // sub-dictionary values. 90 // sub-dictionary values.
91 // 91 //
92 // TODO(akalin): Add has_* information. 92 // TODO(akalin): Add has_* information.
93 // 93 //
94 // TODO(akalin): Improve enum support. 94 // TODO(akalin): Improve enum support.
95 95
96 namespace syncer { 96 namespace syncer {
97 namespace old {
97 98
98 // Ownership of all returned DictionaryValues are transferred to the 99 // Ownership of all returned DictionaryValues are transferred to the
99 // caller. 100 // caller.
100 101
101 // TODO(akalin): Perhaps extend this to decrypt? 102 // TODO(akalin): Perhaps extend this to decrypt?
102 std::unique_ptr<base::DictionaryValue> EncryptedDataToValue( 103 std::unique_ptr<base::DictionaryValue> EncryptedDataToValue(
103 const sync_pb::EncryptedData& encrypted_data); 104 const sync_pb::EncryptedData& encrypted_data);
104 105
105 // Sub-protocol of AppListSpecifics. 106 // Sub-protocol of AppListSpecifics.
106 std::unique_ptr<base::DictionaryValue> AppListSpecificsToValue( 107 std::unique_ptr<base::DictionaryValue> AppListSpecificsToValue(
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 313
313 std::unique_ptr<base::DictionaryValue> ClientConfigParamsToValue( 314 std::unique_ptr<base::DictionaryValue> ClientConfigParamsToValue(
314 const sync_pb::ClientConfigParams& proto); 315 const sync_pb::ClientConfigParams& proto);
315 316
316 std::unique_ptr<base::DictionaryValue> AttachmentIdProtoToValue( 317 std::unique_ptr<base::DictionaryValue> AttachmentIdProtoToValue(
317 const sync_pb::AttachmentIdProto& proto); 318 const sync_pb::AttachmentIdProto& proto);
318 319
319 std::unique_ptr<base::DictionaryValue> EntityMetadataToValue( 320 std::unique_ptr<base::DictionaryValue> EntityMetadataToValue(
320 const sync_pb::EntityMetadata& metadata); 321 const sync_pb::EntityMetadata& metadata);
321 322
323 } // namespace old
322 } // namespace syncer 324 } // namespace syncer
323 325
324 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ 326 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_OLD_VALUE_CONVERSIONS_H_
OLDNEW
« no previous file with comments | « components/sync/protocol/proto_enum_conversions_unittest.cc ('k') | components/sync/protocol/proto_old_value_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698