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

Unified Diff: device/hid/hid_connection.cc

Issue 2804313005: Make HidConnection::Read reentrancy safe (Closed)
Patch Set: Rebased. 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 | « device/hid/hid_connection.h ('k') | device/hid/hid_connection_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/hid/hid_connection.cc
diff --git a/device/hid/hid_connection.cc b/device/hid/hid_connection.cc
index 5a904fe7cfa75ed6c4225a10f3db80e1981f4091..9d5ee20f20bc0ec81f2e6b81f4337e9f9a32fc97 100644
--- a/device/hid/hid_connection.cc
+++ b/device/hid/hid_connection.cc
@@ -170,20 +170,6 @@ void HidConnection::SendFeatureReport(scoped_refptr<net::IOBuffer> buffer,
PlatformSendFeatureReport(buffer, size, callback);
}
-bool HidConnection::CompleteRead(scoped_refptr<net::IOBuffer> buffer,
- size_t size,
- const ReadCallback& callback) {
- DCHECK_GE(size, 1u);
- uint8_t report_id = buffer->data()[0];
- if (IsReportIdProtected(report_id)) {
- HID_LOG(EVENT) << "Filtered a protected input report.";
- return false;
- }
-
- callback.Run(true, buffer, size);
- return true;
-}
-
bool HidConnection::IsReportIdProtected(uint8_t report_id) {
HidCollectionInfo collection_info;
if (FindCollectionByReportId(device_info_->collections(), report_id,
« no previous file with comments | « device/hid/hid_connection.h ('k') | device/hid/hid_connection_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698