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

Unified Diff: components/sync/protocol/proto_old_value_conversions.h

Issue 2433563002: [Sync] Reimplement proto value conversions on top of field visitors. (Closed)
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/protocol/proto_old_value_conversions.h
diff --git a/components/sync/protocol/proto_value_conversions.h b/components/sync/protocol/proto_old_value_conversions.h
similarity index 98%
copy from components/sync/protocol/proto_value_conversions.h
copy to components/sync/protocol/proto_old_value_conversions.h
index 69be46c32f44effda882c885bbc46315404b31f0..f4ecd843a4f48f09d63e0e3a8dbf95f0c694a66a 100644
--- a/components/sync/protocol/proto_value_conversions.h
+++ b/components/sync/protocol/proto_old_value_conversions.h
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_
-#define COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_
+// Keep this file in sync with the .proto files in this directory.
+
+#ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_OLD_VALUE_CONVERSIONS_H_
+#define COMPONENTS_SYNC_PROTOCOL_PROTO_OLD_VALUE_CONVERSIONS_H_
#include <memory>
@@ -82,8 +84,6 @@ class WalletPostalAddress;
class WifiCredentialSpecifics;
} // namespace sync_pb
-// Keep this file in sync with the .proto files in this directory.
-//
// Utility functions to convert sync protocol buffers to dictionaries.
// Each protocol field is mapped to a key of the same name. Repeated
// fields are mapped to array values and sub-messages are mapped to
@@ -94,6 +94,7 @@ class WifiCredentialSpecifics;
// TODO(akalin): Improve enum support.
namespace syncer {
+namespace old {
// Ownership of all returned DictionaryValues are transferred to the
// caller.
@@ -319,6 +320,7 @@ std::unique_ptr<base::DictionaryValue> AttachmentIdProtoToValue(
std::unique_ptr<base::DictionaryValue> EntityMetadataToValue(
const sync_pb::EntityMetadata& metadata);
+} // namespace old
} // namespace syncer
-#endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_
+#endif // COMPONENTS_SYNC_PROTOCOL_PROTO_OLD_VALUE_CONVERSIONS_H_

Powered by Google App Engine
This is Rietveld 408576698