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

Issue 825523003: Convert HidDeviceInfo from a struct to a refcounted class. (Closed)

Created:
6 years ago by Reilly Grant (use Gerrit)
Modified:
5 years, 11 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Convert HidDeviceInfo from a struct to a refcounted class. The HidDeviceInfo object for a device is passed around a lot, including being copied every time enumeration of a device is requested. Since this data is constant once a device is enumerated it is better to keep one copy around for the device for as long as it is connected. This will make it similar to the device::UsbDevice class. I consider this a pre-requisite for storing more information in HidDeviceInfo such as the raw report descriptor. Later patches will revisit how this object is constructed and possibly reduce the number of friend classes. BUG=442818 Committed: https://crrev.com/fbff124cc092ce78fe6b9dea129e9c1b8a2736dd Cr-Commit-Position: refs/heads/master@{#310692}

Patch Set 1 : #

Total comments: 1

Patch Set 2 : Added TODO to remove friend class definitions. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+347 lines, -293 lines) Patch
M device/hid/hid_connection.h View 3 chunks +3 lines, -3 lines 0 comments Download
M device/hid/hid_connection.cc View 7 chunks +19 lines, -20 lines 0 comments Download
M device/hid/hid_connection_linux.h View 1 chunk +1 line, -1 line 0 comments Download
M device/hid/hid_connection_linux.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M device/hid/hid_connection_mac.h View 1 chunk +2 lines, -2 lines 0 comments Download
M device/hid/hid_connection_mac.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M device/hid/hid_connection_unittest.cc View 1 chunk +8 lines, -7 lines 0 comments Download
M device/hid/hid_connection_win.h View 1 chunk +1 line, -1 line 0 comments Download
M device/hid/hid_connection_win.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M device/hid/hid_device_filter.h View 2 chunks +5 lines, -3 lines 0 comments Download
M device/hid/hid_device_filter.cc View 2 chunks +9 lines, -15 lines 0 comments Download
M device/hid/hid_device_filter_unittest.cc View 2 chunks +5 lines, -8 lines 0 comments Download
M device/hid/hid_device_info.h View 1 2 chunks +50 lines, -13 lines 0 comments Download
M device/hid/hid_device_info.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M device/hid/hid_service.h View 3 chunks +8 lines, -7 lines 0 comments Download
M device/hid/hid_service.cc View 5 chunks +20 lines, -12 lines 0 comments Download
M device/hid/hid_service_linux.cc View 9 chunks +19 lines, -17 lines 0 comments Download
M device/hid/hid_service_mac.h View 1 chunk +3 lines, -0 lines 0 comments Download
M device/hid/hid_service_mac.cc View 4 chunks +94 lines, -87 lines 0 comments Download
M device/hid/hid_service_win.cc View 5 chunks +18 lines, -18 lines 0 comments Download
M extensions/browser/api/hid/hid_api.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M extensions/browser/api/hid/hid_apitest.cc View 7 chunks +21 lines, -21 lines 0 comments Download
M extensions/browser/api/hid/hid_device_manager.h View 3 chunks +8 lines, -6 lines 0 comments Download
M extensions/browser/api/hid/hid_device_manager.cc View 9 chunks +27 lines, -27 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
Reilly Grant (use Gerrit)
Ken, please take a look.
5 years, 11 months ago (2015-01-08 20:14:27 UTC) #5
Ken Rockot(use gerrit already)
lgtm https://codereview.chromium.org/825523003/diff/40001/device/hid/hid_device_info.h File device/hid/hid_device_info.h (right): https://codereview.chromium.org/825523003/diff/40001/device/hid/hid_device_info.h#newcode53 device/hid/hid_device_info.h:53: friend class HidServiceMac; Could you please add a ...
5 years, 11 months ago (2015-01-08 20:26:16 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/825523003/60001
5 years, 11 months ago (2015-01-09 02:02:45 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:60001)
5 years, 11 months ago (2015-01-09 03:04:27 UTC) #9
commit-bot: I haz the power
5 years, 11 months ago (2015-01-09 03:05:25 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/fbff124cc092ce78fe6b9dea129e9c1b8a2736dd
Cr-Commit-Position: refs/heads/master@{#310692}

Powered by Google App Engine
This is Rietveld 408576698