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

Unified Diff: content/common/android/gin_java_bridge_value.cc

Issue 2799093006: Remove base::BinaryValue (Closed)
Patch Set: Rebase Created 3 years, 8 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: content/common/android/gin_java_bridge_value.cc
diff --git a/content/common/android/gin_java_bridge_value.cc b/content/common/android/gin_java_bridge_value.cc
index ed3fd7e4c7ba81947c944d87b2a45bc280a0e98f..e745ce81bca74450bab8300e3fbc37df35ef60db 100644
--- a/content/common/android/gin_java_bridge_value.cc
+++ b/content/common/android/gin_java_bridge_value.cc
@@ -26,13 +26,13 @@ struct Header : public base::Pickle::Header {
}
// static
-std::unique_ptr<base::BinaryValue> GinJavaBridgeValue::CreateUndefinedValue() {
+std::unique_ptr<base::Value> GinJavaBridgeValue::CreateUndefinedValue() {
GinJavaBridgeValue gin_value(TYPE_UNDEFINED);
return gin_value.SerializeToBinaryValue();
}
// static
-std::unique_ptr<base::BinaryValue> GinJavaBridgeValue::CreateNonFiniteValue(
+std::unique_ptr<base::Value> GinJavaBridgeValue::CreateNonFiniteValue(
float in_value) {
GinJavaBridgeValue gin_value(TYPE_NONFINITE);
gin_value.pickle_.WriteFloat(in_value);
@@ -40,13 +40,13 @@ std::unique_ptr<base::BinaryValue> GinJavaBridgeValue::CreateNonFiniteValue(
}
// static
-std::unique_ptr<base::BinaryValue> GinJavaBridgeValue::CreateNonFiniteValue(
+std::unique_ptr<base::Value> GinJavaBridgeValue::CreateNonFiniteValue(
double in_value) {
return CreateNonFiniteValue(static_cast<float>(in_value));
}
// static
-std::unique_ptr<base::BinaryValue> GinJavaBridgeValue::CreateObjectIDValue(
+std::unique_ptr<base::Value> GinJavaBridgeValue::CreateObjectIDValue(
int32_t in_value) {
GinJavaBridgeValue gin_value(TYPE_OBJECT_ID);
gin_value.pickle_.WriteInt(in_value);
@@ -111,14 +111,13 @@ GinJavaBridgeValue::GinJavaBridgeValue(Type type) :
header->type = type;
}
-GinJavaBridgeValue::GinJavaBridgeValue(const base::BinaryValue* value)
+GinJavaBridgeValue::GinJavaBridgeValue(const base::Value* value)
: pickle_(value->GetBuffer(), value->GetSize()) {
DCHECK(ContainsGinJavaBridgeValue(value));
}
-std::unique_ptr<base::BinaryValue>
-GinJavaBridgeValue::SerializeToBinaryValue() {
- return base::BinaryValue::CreateWithCopiedBuffer(
+std::unique_ptr<base::Value> GinJavaBridgeValue::SerializeToBinaryValue() {
+ return base::Value::CreateWithCopiedBuffer(
reinterpret_cast<const char*>(pickle_.data()), pickle_.size());
}
« no previous file with comments | « content/common/android/gin_java_bridge_value.h ('k') | content/common/android/gin_java_bridge_value_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698