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

Unified Diff: components/sync/protocol/proto_value_conversions.cc

Issue 2452713003: [Sync] Implement MemoryDumpProvider. (Closed)
Patch Set: Fix presumit; fix Windows; git cl format Created 4 years, 1 month 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_value_conversions.cc
diff --git a/components/sync/protocol/proto_value_conversions.cc b/components/sync/protocol/proto_value_conversions.cc
index 1f6bf95b148b1c61af1845a514069270b84f198d..d2ed4fcb7674936f03d30ccf8a9656312a03374e 100644
--- a/components/sync/protocol/proto_value_conversions.cc
+++ b/components/sync/protocol/proto_value_conversions.cc
@@ -112,7 +112,7 @@ class ToValueVisitor {
const char* field_name,
const google::protobuf::RepeatedPtrField<F>& repeated_field) {
std::unique_ptr<base::ListValue> list(new base::ListValue());
- for (const auto& field: repeated_field) {
+ for (const auto& field : repeated_field) {
list->Append(ToValue(field));
}
value_->Set(field_name, std::move(list));
@@ -123,7 +123,7 @@ class ToValueVisitor {
const char* field_name,
const google::protobuf::RepeatedField<F>& repeated_field) {
std::unique_ptr<base::ListValue> list(new base::ListValue());
- for (const auto& field: repeated_field) {
+ for (const auto& field : repeated_field) {
list->Append(ToValue(field));
}
value_->Set(field_name, std::move(list));
@@ -168,6 +168,30 @@ class ToValueVisitor {
}
}
+ // EnhancedBookmarksFlags
+ template <class P>
+ void Visit(const P& parent_proto,
+ const char* field_name,
+ const sync_pb::EnhancedBookmarksFlags& field) {
+ // Obsolete, don't visit
+ }
+
+ // WalletSyncFlags
+ template <class P>
+ void Visit(const P& parent_proto,
+ const char* field_name,
+ const sync_pb::WalletSyncFlags& field) {
+ // Obsolete, don't visit
+ }
+
+ // PasswordSpecifics
+ std::unique_ptr<base::DictionaryValue> ToValue(
+ const sync_pb::PasswordSpecifics& proto) const {
+ auto value = ToValueImpl(proto);
+ value->Remove("client_only_encrypted_data", nullptr);
+ return value;
+ }
+
// PasswordSpecificsData
std::unique_ptr<base::DictionaryValue> ToValue(
const sync_pb::PasswordSpecificsData& proto) const {
@@ -245,7 +269,7 @@ class ToValueVisitor {
// Needs to be here to see all ToValue() overloads above.
template <class P, class F>
- void VisitImpl(P& proto, const char* field_name, const F& field) {
+ void VisitImpl(P&, const char* field_name, const F& field) {
value_->Set(field_name, ToValue(field));
}
« no previous file with comments | « components/sync/protocol/proto_memory_estimations.cc ('k') | components/sync/protocol/proto_value_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698