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

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

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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/engine_impl/js_mutation_event_observer.cc ('k') | components/sync/syncable/entry_kernel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 89c9983ae97eaecac5a8614fb8cac1a689d93ace..9f3d5d4efcbbc7f6ab66b09ec0c2b5e2a645ff03 100644
--- a/components/sync/protocol/proto_value_conversions.cc
+++ b/components/sync/protocol/proto_value_conversions.cc
@@ -84,9 +84,9 @@ namespace {
// ToValue() doesn't have to return base::DictionaryValue though. It might
// be more appropriate to serialize GreenProto into a string instead:
//
-// std::unique_ptr<base::StringValue> ToValue(
+// std::unique_ptr<base::Value> ToValue(
// const sync_pb::GreenProto& proto) const {
-// return base::MakeUnique<base::StringValue>(proto.content());
+// return base::MakeUnique<base::Value>(proto.content());
// }
//
class ToValueVisitor {
@@ -218,7 +218,7 @@ class ToValueVisitor {
std::unique_ptr<base::Value> ToValue(
const sync_pb::UniquePosition& proto) const {
UniquePosition pos = UniquePosition::FromProto(proto);
- return base::MakeUnique<base::StringValue>(pos.ToDebugString());
+ return base::MakeUnique<base::Value>(pos.ToDebugString());
}
private:
@@ -233,29 +233,29 @@ class ToValueVisitor {
static std::unique_ptr<base::Value> BytesToValue(const std::string& bytes) {
std::string bytes_base64;
base::Base64Encode(bytes, &bytes_base64);
- return base::MakeUnique<base::StringValue>(bytes_base64);
+ return base::MakeUnique<base::Value>(bytes_base64);
}
template <class E>
static std::unique_ptr<base::Value> EnumToValue(E value) {
- return base::MakeUnique<base::StringValue>(ProtoEnumToString(value));
+ return base::MakeUnique<base::Value>(ProtoEnumToString(value));
}
std::unique_ptr<base::Value> ToValue(const std::string& value) const {
- return base::MakeUnique<base::StringValue>(value);
+ return base::MakeUnique<base::Value>(value);
}
std::unique_ptr<base::Value> ToValue(int64_t value) const {
- return base::MakeUnique<base::StringValue>(base::Int64ToString(value));
+ return base::MakeUnique<base::Value>(base::Int64ToString(value));
}
std::unique_ptr<base::Value> ToValue(uint64_t value) const {
- return base::MakeUnique<base::StringValue>(base::Int64ToString(value));
+ return base::MakeUnique<base::Value>(base::Int64ToString(value));
}
std::unique_ptr<base::Value> ToValue(uint32_t value) const {
- return base::MakeUnique<base::StringValue>(base::Int64ToString(value));
+ return base::MakeUnique<base::Value>(base::Int64ToString(value));
}
std::unique_ptr<base::Value> ToValue(int32_t value) const {
- return base::MakeUnique<base::StringValue>(base::Int64ToString(value));
+ return base::MakeUnique<base::Value>(base::Int64ToString(value));
}
std::unique_ptr<base::Value> ToValue(bool value) const {
« no previous file with comments | « components/sync/engine_impl/js_mutation_event_observer.cc ('k') | components/sync/syncable/entry_kernel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698