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

Unified Diff: extensions/browser/api/usb/usb_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: extensions/browser/api/usb/usb_api.cc
diff --git a/extensions/browser/api/usb/usb_api.cc b/extensions/browser/api/usb/usb_api.cc
index 1125cb2a22cab4c761ae9eaf45c5bebb50208501..6006dfbc502b01224fcb4955a054502ec04ae787 100644
--- a/extensions/browser/api/usb/usb_api.cc
+++ b/extensions/browser/api/usb/usb_api.cc
@@ -14,6 +14,7 @@
#include "base/barrier_closure.h"
#include "base/memory/ptr_util.h"
+#include "base/values.h"
#include "device/base/device_client.h"
#include "device/usb/usb_descriptors.h"
#include "device/usb/usb_device_handle.h"
@@ -465,8 +466,8 @@ void UsbTransferFunction::OnCompleted(UsbTransferStatus status,
transfer_info->SetInteger(kResultCodeKey, status);
if (data) {
- transfer_info->Set(kDataKey, base::BinaryValue::CreateWithCopiedBuffer(
- data->data(), length));
+ transfer_info->Set(
+ kDataKey, base::Value::CreateWithCopiedBuffer(data->data(), length));
} else {
transfer_info->Set(kDataKey, new base::Value(base::Value::Type::BINARY));
}
@@ -1239,7 +1240,7 @@ void UsbIsochronousTransferFunction::OnCompleted(
std::unique_ptr<base::DictionaryValue> transfer_info(
new base::DictionaryValue());
transfer_info->SetInteger(kResultCodeKey, status);
- transfer_info->Set(kDataKey, new base::BinaryValue(std::move(buffer)));
+ transfer_info->Set(kDataKey, new base::Value(std::move(buffer)));
if (status == device::USB_TRANSFER_COMPLETED) {
Respond(OneArgument(std::move(transfer_info)));
} else {
« no previous file with comments | « extensions/browser/api/socket/socket_api.cc ('k') | extensions/browser/api/web_request/upload_data_presenter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698