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

Unified Diff: extensions/browser/api/hid/hid_api.cc

Issue 850173002: Use std::vector<char> rather than std::string to represent a base::BinaryValue Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | tools/json_schema_compiler/cc_generator.py » ('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 e021cf2a8cc1aaa88a13edd9b0a8592c69ba3f26..c7d6a83143d5f79a135c2ef59ea40f312a107299 100644
--- a/extensions/browser/api/hid/hid_api.cc
+++ b/extensions/browser/api/hid/hid_api.cc
@@ -253,8 +253,8 @@ void HidSendFunction::StartWork(HidConnection* connection) {
scoped_refptr<net::IOBufferWithSize> buffer(
new net::IOBufferWithSize(parameters_->data.size() + 1));
buffer->data()[0] = static_cast<uint8_t>(parameters_->report_id);
- memcpy(
- buffer->data() + 1, parameters_->data.c_str(), parameters_->data.size());
+ memcpy(buffer->data() + 1, parameters_->data.data(),
+ parameters_->data.size());
connection->Write(buffer, buffer->size(),
base::Bind(&HidSendFunction::OnFinished, this));
}
« no previous file with comments | « no previous file | tools/json_schema_compiler/cc_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698