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: extensions/browser/api/declarative/declarative_api.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
« no previous file with comments | « extensions/browser/api/cast_channel/cast_message_util.cc ('k') | extensions/browser/api/hid/hid_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 84dbfffe50c3a907f8a2c9e76ed680bbb14b6a7e..1b7ca1886cfae38dfd2f8c8601f51cc614af25a4 100644
--- a/extensions/browser/api/declarative/declarative_api.cc
+++ b/extensions/browser/api/declarative/declarative_api.cc
@@ -41,7 +41,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::BinaryValue* binary) {
+std::unique_ptr<base::Value> ConvertBinaryToBase64(base::Value* binary) {
std::string binary_data = std::string(binary->GetBuffer(), binary->GetSize());
std::string data64;
base::Base64Encode(binary_data, &data64);
@@ -56,7 +56,7 @@ void ConvertBinaryListElementsToBase64(base::ListValue* args) {
for (base::ListValue::iterator iter = args->begin(); iter != args->end();
++iter, ++index) {
if ((*iter)->IsType(base::Value::Type::BINARY)) {
- base::BinaryValue* binary = NULL;
+ base::Value* binary = NULL;
if (args->GetBinary(index, &binary))
args->Set(index, ConvertBinaryToBase64(binary).release());
} else if ((*iter)->IsType(base::Value::Type::LIST)) {
@@ -78,7 +78,7 @@ void ConvertBinaryDictionaryValuesToBase64(base::DictionaryValue* dict) {
for (base::DictionaryValue::Iterator iter(*dict); !iter.IsAtEnd();
iter.Advance()) {
if (iter.value().IsType(base::Value::Type::BINARY)) {
- base::BinaryValue* binary = NULL;
+ base::Value* binary = NULL;
if (dict->GetBinary(iter.key(), &binary))
dict->Set(iter.key(), ConvertBinaryToBase64(binary).release());
} else if (iter.value().IsType(base::Value::Type::LIST)) {
« no previous file with comments | « extensions/browser/api/cast_channel/cast_message_util.cc ('k') | extensions/browser/api/hid/hid_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698