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

Unified Diff: extensions/browser/api/declarative/declarative_api.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
Index: extensions/browser/api/declarative/declarative_api.cc
diff --git a/extensions/browser/api/declarative/declarative_api.cc b/extensions/browser/api/declarative/declarative_api.cc
index b2393b2c9a375c9b8105b9942482315c60fb85dc..863f92edd146366231b0c887aaed1a7889d5b589 100644
--- a/extensions/browser/api/declarative/declarative_api.cc
+++ b/extensions/browser/api/declarative/declarative_api.cc
@@ -42,7 +42,7 @@ void ConvertBinaryDictionaryValuesToBase64(base::DictionaryValue* dict);
// Encodes |binary| as base64 and returns a new StringValue populated with the
// encoded string.
std::unique_ptr<base::Value> ConvertBinaryToBase64(base::Value* binary) {
- std::string binary_data = std::string(binary->GetBuffer(), binary->GetSize());
+ std::string binary_data(binary->GetBlob().data(), binary->GetBlob().size());
std::string data64;
base::Base64Encode(binary_data, &data64);
return std::unique_ptr<base::Value>(new base::Value(data64));
« no previous file with comments | « extensions/browser/api/cast_channel/cast_message_util.cc ('k') | extensions/browser/api/socket/socket_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698