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

Unified Diff: chrome/browser/extensions/api/idltest/idltest_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
Index: chrome/browser/extensions/api/idltest/idltest_api.cc
diff --git a/chrome/browser/extensions/api/idltest/idltest_api.cc b/chrome/browser/extensions/api/idltest/idltest_api.cc
index 1864fd8e3c5368c9da3738fb74c3d71792e12984..da7ba52e646211927f05a85a182947f5017368d5 100644
--- a/chrome/browser/extensions/api/idltest/idltest_api.cc
+++ b/chrome/browser/extensions/api/idltest/idltest_api.cc
@@ -10,12 +10,12 @@
#include "base/values.h"
-using base::BinaryValue;
+using base::Value;
namespace {
std::unique_ptr<base::ListValue> CopyBinaryValueToIntegerList(
- const BinaryValue* input) {
+ const Value* input) {
std::unique_ptr<base::ListValue> output(new base::ListValue());
const char* input_buffer = input->GetBuffer();
for (size_t i = 0; i < input->GetSize(); i++) {
@@ -27,19 +27,19 @@ std::unique_ptr<base::ListValue> CopyBinaryValueToIntegerList(
} // namespace
ExtensionFunction::ResponseAction IdltestSendArrayBufferFunction::Run() {
- BinaryValue* input = NULL;
+ Value* input = NULL;
EXTENSION_FUNCTION_VALIDATE(args_ != NULL && args_->GetBinary(0, &input));
return RespondNow(OneArgument(CopyBinaryValueToIntegerList(input)));
}
ExtensionFunction::ResponseAction IdltestSendArrayBufferViewFunction::Run() {
- BinaryValue* input = NULL;
+ Value* input = NULL;
EXTENSION_FUNCTION_VALIDATE(args_ != NULL && args_->GetBinary(0, &input));
return RespondNow(OneArgument(CopyBinaryValueToIntegerList(input)));
}
ExtensionFunction::ResponseAction IdltestGetArrayBufferFunction::Run() {
std::string hello = "hello world";
- return RespondNow(OneArgument(
- BinaryValue::CreateWithCopiedBuffer(hello.c_str(), hello.size())));
+ return RespondNow(
+ OneArgument(Value::CreateWithCopiedBuffer(hello.c_str(), hello.size())));
}

Powered by Google App Engine
This is Rietveld 408576698