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

Issue 10829228: [LINUX] Extract the name and id of the device and send it along the device attach message. (Closed)

Created:
8 years, 4 months ago by kmadhusu
Modified:
8 years, 4 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

[LINUX] Extract the name and id of the device and send it along the device attach notification message. Using udev library, extract the device name and id property. If ID_FS_UUID and ID_FS_LABEL does not exists, construct a unique id and label using device model and vendor information. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=151811

Patch Set 1 #

Patch Set 2 : Fix unit tests #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 26

Patch Set 5 : Added dependency to udev library to fix componenet build compile error. #

Total comments: 14

Patch Set 6 : Address review comments. #

Total comments: 30

Patch Set 7 : Fixed nits #

Total comments: 52

Patch Set 8 : Addressed review comments #

Total comments: 35

Patch Set 9 : Addressed review comments #

Patch Set 10 : Fix nits #

Total comments: 2

Patch Set 11 : '' #

Patch Set 12 : '' #

Total comments: 36

Patch Set 13 : fix nits #

Total comments: 19

Patch Set 14 : Added more documentation #

Patch Set 15 : '' #

Total comments: 8

Patch Set 16 : Addressed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+347 lines, -119 lines) Patch
M chrome/browser/media_gallery/media_device_notifications_linux.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +33 lines, -16 lines 0 comments Download
M chrome/browser/media_gallery/media_device_notifications_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +231 lines, -86 lines 0 comments Download
M chrome/browser/media_gallery/media_device_notifications_linux_unittest.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +78 lines, -17 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
kmadhusu
thestig: PTAL. Thanks.
8 years, 4 months ago (2012-08-08 20:42:21 UTC) #1
kmadhusu
Cc'ed vandebo@
8 years, 4 months ago (2012-08-08 20:51:32 UTC) #2
Lei Zhang
http://codereview.chromium.org/10829228/diff/5001/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): http://codereview.chromium.org/10829228/diff/5001/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode12 chrome/browser/media_gallery/media_device_notifications_linux.cc:12: #include <libudev.h> not: C header should be grouped with ...
8 years, 4 months ago (2012-08-09 00:32:41 UTC) #3
Lei Zhang
http://codereview.chromium.org/10829228/diff/9001/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (left): http://codereview.chromium.org/10829228/diff/9001/chrome/browser/media_gallery/media_device_notifications_linux.cc#oldcode151 chrome/browser/media_gallery/media_device_notifications_linux.cc:151: // New device mounted. Please retain this comment. http://codereview.chromium.org/10829228/diff/9001/chrome/browser/media_gallery/media_device_notifications_linux.cc#oldcode197 ...
8 years, 4 months ago (2012-08-09 01:11:59 UTC) #4
kmadhusu
thestig: Addressed review comments. PTAL. Thanks. http://codereview.chromium.org/10829228/diff/5001/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): http://codereview.chromium.org/10829228/diff/5001/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode12 chrome/browser/media_gallery/media_device_notifications_linux.cc:12: #include <libudev.h> On ...
8 years, 4 months ago (2012-08-09 02:48:40 UTC) #5
Lei Zhang
https://chromiumcodereview.appspot.com/10829228/diff/1007/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): https://chromiumcodereview.appspot.com/10829228/diff/1007/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode61 chrome/browser/media_gallery/media_device_notifications_linux.cc:61: udev_ptr = udev_new(); nit: combine with previous line. https://chromiumcodereview.appspot.com/10829228/diff/1007/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode66 ...
8 years, 4 months ago (2012-08-09 03:47:16 UTC) #6
kmadhusu
thestig: Fixed nits. PTAL. Thanks. http://codereview.chromium.org/10829228/diff/1007/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): http://codereview.chromium.org/10829228/diff/1007/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode61 chrome/browser/media_gallery/media_device_notifications_linux.cc:61: udev_ptr = udev_new(); On ...
8 years, 4 months ago (2012-08-09 08:10:02 UTC) #7
vandebo (ex-Chrome)
http://codereview.chromium.org/10829228/diff/1008/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (left): http://codereview.chromium.org/10829228/diff/1008/chrome/browser/media_gallery/media_device_notifications_linux.cc#oldcode176 chrome/browser/media_gallery/media_device_notifications_linux.cc:176: // Add entries, but overwrite entries for the same ...
8 years, 4 months ago (2012-08-09 17:52:35 UTC) #8
vandebo (ex-Chrome)
http://codereview.chromium.org/10829228/diff/1008/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): http://codereview.chromium.org/10829228/diff/1008/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode342 chrome/browser/media_gallery/media_device_notifications_linux.cc:342: UMA_HISTOGRAM_BOOLEAN("MediaDeviceNotification.device_info_available", Can we distinguish these from the CrOS ones ...
8 years, 4 months ago (2012-08-09 17:54:46 UTC) #9
kmadhusu
vandebo@: Addressed review comments (except for the udev_device_get_property_value return value ownership semantics). PTAL. Thanks. http://codereview.chromium.org/10829228/diff/1008/chrome/browser/media_gallery/media_device_notifications_linux.cc ...
8 years, 4 months ago (2012-08-09 23:41:28 UTC) #10
vandebo (ex-Chrome)
http://codereview.chromium.org/10829228/diff/1008/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): http://codereview.chromium.org/10829228/diff/1008/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode304 chrome/browser/media_gallery/media_device_notifications_linux.cc:304: typedef std::map<std::string, int> MountPointsInfoMap; On 2012/08/09 23:41:29, kmadhusu wrote: ...
8 years, 4 months ago (2012-08-10 00:32:58 UTC) #11
Lei Zhang
http://codereview.chromium.org/10829228/diff/2004/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): http://codereview.chromium.org/10829228/diff/2004/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode42 chrome/browser/media_gallery/media_device_notifications_linux.cc:42: // Device property constants. nit: you may want to ...
8 years, 4 months ago (2012-08-10 10:26:33 UTC) #12
vandebo (ex-Chrome)
http://codereview.chromium.org/10829228/diff/2004/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): http://codereview.chromium.org/10829228/diff/2004/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode330 chrome/browser/media_gallery/media_device_notifications_linux.cc:330: DeviceMap::iterator it = device_map.find(mount_device); On 2012/08/10 10:26:33, Lei Zhang ...
8 years, 4 months ago (2012-08-10 17:25:10 UTC) #13
kmadhusu
Addressed review comments. PTAL. Thanks. http://codereview.chromium.org/10829228/diff/1008/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): http://codereview.chromium.org/10829228/diff/1008/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode93 chrome/browser/media_gallery/media_device_notifications_linux.cc:93: (dev_name = udev_device_get_property_value(device, kSerial))) ...
8 years, 4 months ago (2012-08-10 19:41:01 UTC) #14
vandebo (ex-Chrome)
http://codereview.chromium.org/10829228/diff/4013/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): http://codereview.chromium.org/10829228/diff/4013/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode148 chrome/browser/media_gallery/media_device_notifications_linux.cc:148: *id += kVendorIdPrefix; It'd be pretty tough to parse ...
8 years, 4 months ago (2012-08-11 00:55:20 UTC) #15
kmadhusu
http://codereview.chromium.org/10829228/diff/4013/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): http://codereview.chromium.org/10829228/diff/4013/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode148 chrome/browser/media_gallery/media_device_notifications_linux.cc:148: *id += kVendorIdPrefix; On 2012/08/11 00:55:20, vandebo wrote: > ...
8 years, 4 months ago (2012-08-12 02:52:04 UTC) #16
vandebo (ex-Chrome)
LGTM with nits http://codereview.chromium.org/10829228/diff/11007/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): http://codereview.chromium.org/10829228/diff/11007/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode28 chrome/browser/media_gallery/media_device_notifications_linux.cc:28: using base::SystemMonitor; This is already on ...
8 years, 4 months ago (2012-08-13 18:31:18 UTC) #17
kmadhusu
Addressed nits. http://codereview.chromium.org/10829228/diff/11007/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): http://codereview.chromium.org/10829228/diff/11007/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode28 chrome/browser/media_gallery/media_device_notifications_linux.cc:28: using base::SystemMonitor; On 2012/08/13 18:31:18, vandebo wrote: ...
8 years, 4 months ago (2012-08-13 19:36:57 UTC) #18
vandebo (ex-Chrome)
LGTM
8 years, 4 months ago (2012-08-13 19:41:43 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kmadhusu@chromium.org/10829228/5009
8 years, 4 months ago (2012-08-13 19:48:24 UTC) #20
commit-bot: I haz the power
Presubmit check for 10829228-5009 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-08-13 19:48:27 UTC) #21
kmadhusu
jhawkins@: Could you do an OWNERS review for chrome/ dir? Thanks.
8 years, 4 months ago (2012-08-13 19:51:21 UTC) #22
James Hawkins
https://chromiumcodereview.appspot.com/10829228/diff/5009/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): https://chromiumcodereview.appspot.com/10829228/diff/5009/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode91 chrome/browser/media_gallery/media_device_notifications_linux.cc:91: CHECK(udev_obj.get()); CHECK should only be used to debug a ...
8 years, 4 months ago (2012-08-13 20:30:37 UTC) #23
kmadhusu
jhawkins: Added more documentation. PTAL. Thanks. https://chromiumcodereview.appspot.com/10829228/diff/5009/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): https://chromiumcodereview.appspot.com/10829228/diff/5009/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode91 chrome/browser/media_gallery/media_device_notifications_linux.cc:91: CHECK(udev_obj.get()); On 2012/08/13 ...
8 years, 4 months ago (2012-08-13 21:29:43 UTC) #24
James Hawkins
https://chromiumcodereview.appspot.com/10829228/diff/5009/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): https://chromiumcodereview.appspot.com/10829228/diff/5009/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode91 chrome/browser/media_gallery/media_device_notifications_linux.cc:91: CHECK(udev_obj.get()); On 2012/08/13 21:29:43, kmadhusu wrote: > On 2012/08/13 ...
8 years, 4 months ago (2012-08-14 16:16:29 UTC) #25
kmadhusu
jhawkins@: Addressed nits. PTAL. Thanks. https://chromiumcodereview.appspot.com/10829228/diff/5009/chrome/browser/media_gallery/media_device_notifications_linux.cc File chrome/browser/media_gallery/media_device_notifications_linux.cc (right): https://chromiumcodereview.appspot.com/10829228/diff/5009/chrome/browser/media_gallery/media_device_notifications_linux.cc#newcode91 chrome/browser/media_gallery/media_device_notifications_linux.cc:91: CHECK(udev_obj.get()); On 2012/08/14 16:16:29, ...
8 years, 4 months ago (2012-08-14 17:11:11 UTC) #26
kmadhusu
jhawkins@: ping
8 years, 4 months ago (2012-08-15 00:14:06 UTC) #27
James Hawkins
lgtm
8 years, 4 months ago (2012-08-15 17:35:45 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kmadhusu@chromium.org/10829228/14012
8 years, 4 months ago (2012-08-15 18:40:37 UTC) #29
commit-bot: I haz the power
Try job failure for 10829228-14012 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-15 19:15:37 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kmadhusu@chromium.org/10829228/14012
8 years, 4 months ago (2012-08-15 20:08:35 UTC) #31
commit-bot: I haz the power
Try job failure for 10829228-14012 (retry) on linux_rel for step "interactive_ui_tests". It's a second try, ...
8 years, 4 months ago (2012-08-15 22:39:15 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kmadhusu@chromium.org/10829228/14012
8 years, 4 months ago (2012-08-15 22:49:02 UTC) #33
commit-bot: I haz the power
8 years, 4 months ago (2012-08-16 01:12:37 UTC) #34
Change committed as 151811

Powered by Google App Engine
This is Rietveld 408576698