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

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

Issue 2841623003: Remove base::Value::Get{Buffer,Size} (Closed)
Patch Set: std::vector::assign instead of std::vector::operator= 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
« no previous file with comments | « content/child/v8_value_converter_impl.cc ('k') | extensions/browser/api/cast_channel/cast_message_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e745ce81bca74450bab8300e3fbc37df35ef60db..46d412d0161fb289e1f9c2f65c53c2bbd71d12a7 100644
--- a/content/common/android/gin_java_bridge_value.cc
+++ b/content/common/android/gin_java_bridge_value.cc
@@ -57,9 +57,9 @@ std::unique_ptr<base::Value> GinJavaBridgeValue::CreateObjectIDValue(
bool GinJavaBridgeValue::ContainsGinJavaBridgeValue(const base::Value* value) {
if (!value->IsType(base::Value::Type::BINARY))
return false;
- if (value->GetSize() < sizeof(Header))
+ if (value->GetBlob().size() < sizeof(Header))
return false;
- base::Pickle pickle(value->GetBuffer(), value->GetSize());
+ base::Pickle pickle(value->GetBlob().data(), value->GetBlob().size());
// Broken binary value: payload or header size is wrong
if (!pickle.data() || pickle.size() - pickle.payload_size() != sizeof(Header))
return false;
@@ -112,7 +112,7 @@ GinJavaBridgeValue::GinJavaBridgeValue(Type type) :
}
GinJavaBridgeValue::GinJavaBridgeValue(const base::Value* value)
- : pickle_(value->GetBuffer(), value->GetSize()) {
+ : pickle_(value->GetBlob().data(), value->GetBlob().size()) {
DCHECK(ContainsGinJavaBridgeValue(value));
}
« no previous file with comments | « content/child/v8_value_converter_impl.cc ('k') | extensions/browser/api/cast_channel/cast_message_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698