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

Unified Diff: extensions/browser/api/hid/hid_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/declarative/declarative_api.cc ('k') | extensions/browser/api/socket/socket_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/hid/hid_api.cc
diff --git a/extensions/browser/api/hid/hid_api.cc b/extensions/browser/api/hid/hid_api.cc
index 0f8fb5064e31dd71401f542546893e1f2fa7571a..ff3d8e7db9031949aac4867aadff8d0dc59dfd69 100644
--- a/extensions/browser/api/hid/hid_api.cc
+++ b/extensions/browser/api/hid/hid_api.cc
@@ -11,6 +11,7 @@
#include <vector>
#include "base/memory/ptr_util.h"
+#include "base/values.h"
#include "device/base/device_client.h"
#include "device/hid/hid_connection.h"
#include "device/hid/hid_device_filter.h"
@@ -268,9 +269,9 @@ void HidReceiveFunction::OnFinished(bool success,
DCHECK_GE(size, 1u);
int report_id = reinterpret_cast<uint8_t*>(buffer->data())[0];
- Respond(TwoArguments(base::MakeUnique<base::Value>(report_id),
- base::BinaryValue::CreateWithCopiedBuffer(
- buffer->data() + 1, size - 1)));
+ Respond(TwoArguments(
+ base::MakeUnique<base::Value>(report_id),
+ base::Value::CreateWithCopiedBuffer(buffer->data() + 1, size - 1)));
} else {
Respond(Error(kErrorTransfer));
}
@@ -329,8 +330,8 @@ void HidReceiveFeatureReportFunction::OnFinished(
scoped_refptr<net::IOBuffer> buffer,
size_t size) {
if (success) {
- Respond(OneArgument(
- base::BinaryValue::CreateWithCopiedBuffer(buffer->data(), size)));
+ Respond(
+ OneArgument(base::Value::CreateWithCopiedBuffer(buffer->data(), size)));
} else {
Respond(Error(kErrorTransfer));
}
« no previous file with comments | « extensions/browser/api/declarative/declarative_api.cc ('k') | extensions/browser/api/socket/socket_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698