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

Unified Diff: extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc

Issue 820673004: json_schema_compiler: Use std::vector<char> for binary values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simplify_json_schema
Patch Set: Fix merge error. Created 5 years, 11 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/bluetooth_socket/bluetooth_socket_event_dispatcher.cc
diff --git a/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc b/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc
index 43528d8f9a126e370e629943d517e4f89f602c13..3daadf391d1dea8ff7b97e607763023091d07667 100644
--- a/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc
+++ b/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc
@@ -191,7 +191,7 @@ void BluetoothSocketEventDispatcher::ReceiveCallback(
// Dispatch "onReceive" event.
bluetooth_socket::ReceiveInfo receive_info;
receive_info.socket_id = params.socket_id;
- receive_info.data = std::string(io_buffer->data(), bytes_read);
+ receive_info.data.assign(io_buffer->data(), io_buffer->data() + bytes_read);
scoped_ptr<base::ListValue> args =
bluetooth_socket::OnReceive::Create(receive_info);
scoped_ptr<Event> event(

Powered by Google App Engine
This is Rietveld 408576698