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

Issue 161823002: Clean up HID backend and API. (Closed)

Created:
6 years, 10 months ago by Ken Rockot(use gerrit already)
Modified:
6 years, 9 months ago
Reviewers:
Mark Mentovai, scheib
CC:
chromium-reviews, mschilder1
Visibility:
Public.

Description

Clean up HID backend and API. The Mac backend no longer creates its own thread and instead simply enforces single-threaded usage on any thread which supports I/O. Ref management has also been sanitized. The Linux backend now implements feature report support. The backend interface no longer expects implicit report IDs in buffers passed to Write or SetFeatureReport. Instead these interfaces (as well as GetFeatureReport) take explicit report ID arguments. The API interface has been updated to reflect the improved report ID treatment. Finally, the API also now exposes opaque device identifiers on enumeration, rather than exposing raw system paths or other information that could be potentially sensitive. BUG=347294 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=253853

Patch Set 1 #

Patch Set 2 : More cleanup. #

Patch Set 3 : O, Rietveld #

Patch Set 4 : let's try this again #

Patch Set 5 : . #

Patch Set 6 : for reals #

Total comments: 41

Patch Set 7 : further cleanup #

Patch Set 8 : fix bad rebase #

Patch Set 9 : missing constant? #

Patch Set 10 : win headers #

Patch Set 11 : linux headers #

Total comments: 21

Patch Set 12 : Many cleanup, such device ID, woww. #

Total comments: 16

Patch Set 13 : Simplified device IDs, cleanup #

Patch Set 14 : rework report ID usage; update tests #

Patch Set 15 : cleanup #

Total comments: 9

Patch Set 16 : addressed comments #

Total comments: 12

Patch Set 17 : address comments, formatting #

Patch Set 18 : Give HID API some OWNERS #

Total comments: 2

Patch Set 19 : no more static initializer #

Patch Set 20 : rebase #

Patch Set 21 : fix keyboard noise #

Patch Set 22 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1055 lines, -1104 lines) Patch
A + chrome/browser/extensions/api/hid/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/browser/extensions/api/hid/hid_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/hid/hid_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 10 chunks +41 lines, -71 lines 0 comments Download
A + chrome/browser/extensions/api/hid/hid_connection_resource.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +6 lines, -16 lines 0 comments Download
A + chrome/browser/extensions/api/hid/hid_connection_resource.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -4 lines 0 comments Download
A chrome/browser/extensions/api/hid/hid_device_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +62 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/hid/hid_device_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +105 lines, -0 lines 0 comments Download
D chrome/browser/extensions/api/hid/hid_device_resource.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -53 lines 0 comments Download
D chrome/browser/extensions/api/hid/hid_device_resource.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -34 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/common/extensions/api/hid.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +9 lines, -3 lines 0 comments Download
M device/hid/hid_connection.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +29 lines, -18 lines 0 comments Download
M device/hid/hid_connection.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +9 lines, -5 lines 0 comments Download
M device/hid/hid_connection_linux.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +10 lines, -19 lines 0 comments Download
M device/hid/hid_connection_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +98 lines, -78 lines 0 comments Download
M device/hid/hid_connection_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +33 lines, -29 lines 0 comments Download
M device/hid/hid_connection_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +113 lines, -127 lines 0 comments Download
M device/hid/hid_connection_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +11 lines, -13 lines 0 comments Download
M device/hid/hid_connection_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +18 lines, -57 lines 0 comments Download
M device/hid/hid_connection_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +155 lines, -146 lines 0 comments Download
M device/hid/hid_device_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +24 lines, -10 lines 0 comments Download
M device/hid/hid_device_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +7 lines, -2 lines 0 comments Download
M device/hid/hid_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +12 lines, -27 lines 0 comments Download
M device/hid/hid_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +32 lines, -39 lines 0 comments Download
M device/hid/hid_service_linux.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +8 lines, -4 lines 0 comments Download
M device/hid/hid_service_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +46 lines, -52 lines 0 comments Download
M device/hid/hid_service_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +18 lines, -35 lines 0 comments Download
M device/hid/hid_service_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +116 lines, -188 lines 0 comments Download
M device/hid/hid_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -8 lines 0 comments Download
M device/hid/hid_service_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +6 lines, -10 lines 0 comments Download
M device/hid/hid_service_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 8 chunks +34 lines, -27 lines 0 comments Download
M device/hid/hid_utils_mac.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +15 lines, -8 lines 0 comments Download
M device/hid/hid_utils_mac.cc View 1 2 3 4 5 6 7 1 chunk +20 lines, -14 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
Mark Mentovai
“Old chunk mismatch.” I know, Rietveld kicks out 500s like it’s going out of style. ...
6 years, 10 months ago (2014-02-13 14:36:08 UTC) #1
Ken Rockot(use gerrit already)
On 2014/02/13 14:36:08, Mark Mentovai wrote: > “Old chunk mismatch.” I know, Rietveld kicks out ...
6 years, 10 months ago (2014-02-13 18:06:07 UTC) #2
Mark Mentovai
Convenience link to original change where the first batch of comments went: https://codereview.chromium.org/143883005
6 years, 10 months ago (2014-02-13 21:19:33 UTC) #3
Mark Mentovai
I’m pretty upset that I just spent an hour carefully reviewing this, and you didn’t ...
6 years, 10 months ago (2014-02-13 22:37:50 UTC) #4
Ken Rockot(use gerrit already)
On 2014/02/13 22:37:50, Mark Mentovai wrote: > I’m pretty upset that I just spent an ...
6 years, 10 months ago (2014-02-13 22:40:30 UTC) #5
Mark Mentovai
It is moving in the right direction. Next time, please be very explicit about the ...
6 years, 10 months ago (2014-02-13 22:45:38 UTC) #6
Ken Rockot(use gerrit already)
Ok. Progress. This is really ready for review now. One thing I noticed is that ...
6 years, 10 months ago (2014-02-18 19:43:09 UTC) #7
Mark Mentovai
Using 0 instead of kIOHIDManagerOptionNone is fine. Here’s what I meant about location IDs: When ...
6 years, 10 months ago (2014-02-19 22:48:15 UTC) #8
Ken Rockot(use gerrit already)
Thanks. You're absolutely right about composite devices. I see that location HID is totally ambiguous ...
6 years, 10 months ago (2014-02-21 02:15:35 UTC) #9
Mark Mentovai
OK, this is definitely shaping up. It’s way better than the state we found it ...
6 years, 10 months ago (2014-02-21 17:48:18 UTC) #10
Ken Rockot(use gerrit already)
I like the device ID suggestion. I've moved the integer handle mapping up to the ...
6 years, 10 months ago (2014-02-22 01:17:04 UTC) #11
Mark Mentovai
I’m being called away to a meeting, but here’s what I’ve got so far. https://codereview.chromium.org/161823002/diff/880001/device/hid/hid_service_mac.cc ...
6 years, 10 months ago (2014-02-24 20:23:35 UTC) #12
Ken Rockot(use gerrit already)
Cool. Addressed the comments so far. https://codereview.chromium.org/161823002/diff/1210001/chrome/browser/extensions/api/hid/hid_device_manager.cc File chrome/browser/extensions/api/hid/hid_device_manager.cc (right): https://codereview.chromium.org/161823002/diff/1210001/chrome/browser/extensions/api/hid/hid_device_manager.cc#newcode14 chrome/browser/extensions/api/hid/hid_device_manager.cc:14: static base::LazyInstance<ProfileKeyedAPIFactory<HidDeviceManager> > ...
6 years, 10 months ago (2014-02-25 21:30:00 UTC) #13
Mark Mentovai
I don’t think there’s anything major here other than the one-definition rule violation, but that’s ...
6 years, 10 months ago (2014-02-26 17:41:43 UTC) #14
Ken Rockot(use gerrit already)
Thank you for the review, Mark. +scheib@, can you please take a look as c/b/e ...
6 years, 10 months ago (2014-02-26 22:36:39 UTC) #15
Mark Mentovai
https://codereview.chromium.org/161823002/diff/1300001/device/hid/hid_device_info.cc File device/hid/hid_device_info.cc (right): https://codereview.chromium.org/161823002/diff/1300001/device/hid/hid_device_info.cc#newcode10 device/hid/hid_device_info.cc:10: const HidDeviceId kInvalidHidDeviceId; Whoops, I just realized that this ...
6 years, 10 months ago (2014-02-26 22:41:03 UTC) #16
Ken Rockot(use gerrit already)
https://codereview.chromium.org/161823002/diff/1300001/device/hid/hid_device_info.cc File device/hid/hid_device_info.cc (right): https://codereview.chromium.org/161823002/diff/1300001/device/hid/hid_device_info.cc#newcode10 device/hid/hid_device_info.cc:10: const HidDeviceId kInvalidHidDeviceId; On 2014/02/26 22:41:04, Mark Mentovai wrote: ...
6 years, 10 months ago (2014-02-26 22:51:01 UTC) #17
Mark Mentovai
LGTM
6 years, 10 months ago (2014-02-26 22:57:39 UTC) #18
scheib
lgtm
6 years, 10 months ago (2014-02-26 22:58:09 UTC) #19
Ken Rockot(use gerrit already)
The CQ bit was checked by rockot@chromium.org
6 years, 10 months ago (2014-02-26 23:15:07 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rockot@chromium.org/161823002/1340001
6 years, 10 months ago (2014-02-26 23:20:07 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-26 23:46:34 UTC) #22
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=52297
6 years, 10 months ago (2014-02-26 23:46:34 UTC) #23
Ken Rockot(use gerrit already)
The CQ bit was checked by rockot@chromium.org
6 years, 10 months ago (2014-02-26 23:53:25 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rockot@chromium.org/161823002/1360001
6 years, 10 months ago (2014-02-26 23:56:37 UTC) #25
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-02-27 05:24:21 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel
6 years, 9 months ago (2014-02-27 05:24:22 UTC) #27
Ken Rockot(use gerrit already)
The CQ bit was checked by rockot@chromium.org
6 years, 9 months ago (2014-02-27 07:50:43 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rockot@chromium.org/161823002/1350034
6 years, 9 months ago (2014-02-27 07:51:24 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-02-27 09:32:35 UTC) #30
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=271249
6 years, 9 months ago (2014-02-27 09:32:35 UTC) #31
Ken Rockot(use gerrit already)
The CQ bit was checked by rockot@chromium.org
6 years, 9 months ago (2014-02-27 16:08:59 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rockot@chromium.org/161823002/1350034
6 years, 9 months ago (2014-02-27 16:10:20 UTC) #33
commit-bot: I haz the power
6 years, 9 months ago (2014-02-27 17:29:13 UTC) #34
Message was sent while issue was closed.
Change committed as 253853

Powered by Google App Engine
This is Rietveld 408576698