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

Issue 9363008: Add Media device notification to SystemMonitor and Mac impl (Closed)

Created:
8 years, 10 months ago by vandebo (ex-Chrome)
Modified:
8 years, 9 months ago
CC:
chromium-reviews, brettw-cc_chromium.org, tpayne, scottmg
Visibility:
Public.

Description

Add Media device notification to SystemMonitor and Mac impl BUG=110400 TEST=run chrome with -v=1, attach and a mass storage media device and observe the log entries for the attach and detach events. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=124288

Patch Set 1 #

Total comments: 6

Patch Set 2 : Checkpoint #

Patch Set 3 : Working Mac Impl #

Patch Set 4 : Fix patch base #

Patch Set 5 : nit #

Patch Set 6 : Fix win build #

Patch Set 7 : Turns out, we want a number id on Windows too #

Total comments: 17

Patch Set 8 : Address comments #

Total comments: 2

Patch Set 9 : Use gmock and rebase #

Patch Set 10 : Address comments #

Patch Set 11 : Missing include #

Total comments: 1

Patch Set 12 : Clang fix #

Patch Set 13 : Arg! add missing file #

Total comments: 2

Patch Set 14 : Move mac notification code to content #

Total comments: 21

Patch Set 15 : Address comments #

Total comments: 14

Patch Set 16 : Address comments #

Total comments: 4

Patch Set 17 : Fix link settings and typo. #

Patch Set 18 : Fix lint errors #

Patch Set 19 : Type #

Unified diffs Side-by-side diffs Delta from patch set Stats (+300 lines, -28 lines) Patch
M base/base.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M base/mac/foundation_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -0 lines 0 comments Download
M base/mac/foundation_util.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -0 lines 0 comments Download
M base/system_monitor/system_monitor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 7 chunks +26 lines, -1 line 0 comments Download
M base/system_monitor/system_monitor.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +26 lines, -1 line 0 comments Download
M base/system_monitor/system_monitor_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +28 lines, -26 lines 0 comments Download
A base/test/mock_devices_changed_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +36 lines, -0 lines 0 comments Download
A base/test/mock_devices_changed_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +17 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -0 lines 0 comments Download
A content/browser/mac/media_device_notifications.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +15 lines, -0 lines 0 comments Download
A content/browser/mac/media_device_notifications.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +133 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (0 generated)
vandebo (ex-Chrome)
Tony noticed that there's already a device notification mechanism in base/system_monitor. Will Chan thinks it's ...
8 years, 10 months ago (2012-02-08 00:41:30 UTC) #1
tpayne
https://chromiumcodereview.appspot.com/9363008/diff/1/base/system_monitor/system_monitor.cc File base/system_monitor/system_monitor.cc (right): https://chromiumcodereview.appspot.com/9363008/diff/1/base/system_monitor/system_monitor.cc#newcode88 base/system_monitor/system_monitor.cc:88: NotifyDevicesChanged(); At least on windows, this will end up ...
8 years, 10 months ago (2012-02-08 16:20:30 UTC) #2
vandebo (ex-Chrome)
https://chromiumcodereview.appspot.com/9363008/diff/1/base/system_monitor/system_monitor.cc File base/system_monitor/system_monitor.cc (right): https://chromiumcodereview.appspot.com/9363008/diff/1/base/system_monitor/system_monitor.cc#newcode88 base/system_monitor/system_monitor.cc:88: NotifyDevicesChanged(); On 2012/02/08 16:20:30, tpayne wrote: > At least ...
8 years, 10 months ago (2012-02-08 18:37:01 UTC) #3
tpayne
https://chromiumcodereview.appspot.com/9363008/diff/1/base/system_monitor/system_monitor_unittest.cc File base/system_monitor/system_monitor_unittest.cc (right): https://chromiumcodereview.appspot.com/9363008/diff/1/base/system_monitor/system_monitor_unittest.cc#newcode152 base/system_monitor/system_monitor_unittest.cc:152: system_monitor.ProcessMediaDeviceAttached("media device", FilePath("path")); FilePath("path") does not compile on Windows, ...
8 years, 10 months ago (2012-02-08 20:46:43 UTC) #4
Lei Zhang
https://chromiumcodereview.appspot.com/9363008/diff/1/base/system_monitor/system_monitor_unittest.cc File base/system_monitor/system_monitor_unittest.cc (right): https://chromiumcodereview.appspot.com/9363008/diff/1/base/system_monitor/system_monitor_unittest.cc#newcode152 base/system_monitor/system_monitor_unittest.cc:152: system_monitor.ProcessMediaDeviceAttached("media device", FilePath("path")); On 2012/02/08 20:46:44, tpayne wrote: > ...
8 years, 10 months ago (2012-02-08 23:34:13 UTC) #5
vandebo (ex-Chrome)
Will, Chris, PTAL
8 years, 10 months ago (2012-02-10 01:50:21 UTC) #6
csilv
lgtm http://codereview.chromium.org/9363008/diff/13001/base/system_monitor/system_monitor_mac.mm File base/system_monitor/system_monitor_mac.mm (right): http://codereview.chromium.org/9363008/diff/13001/base/system_monitor/system_monitor_mac.mm#newcode10 base/system_monitor/system_monitor_mac.mm:10: #import <Carbon/Carbon.h> use #include instead, #import only for ...
8 years, 10 months ago (2012-02-13 05:49:28 UTC) #7
Lei Zhang
http://codereview.chromium.org/9363008/diff/13001/base/system_monitor/system_monitor.cc File base/system_monitor/system_monitor.cc (right): http://codereview.chromium.org/9363008/diff/13001/base/system_monitor/system_monitor.cc#newcode14 base/system_monitor/system_monitor.cc:14: static SystemMonitor* g_system_monitor = NULL; Should this be a ...
8 years, 10 months ago (2012-02-14 01:07:22 UTC) #8
Lei Zhang
http://codereview.chromium.org/9363008/diff/13001/base/system_monitor/system_monitor.cc File base/system_monitor/system_monitor.cc (right): http://codereview.chromium.org/9363008/diff/13001/base/system_monitor/system_monitor.cc#newcode150 base/system_monitor/system_monitor.cc:150: void SystemMonitor::BatteryCheck() { Also, this can be wrapped in ...
8 years, 10 months ago (2012-02-14 01:58:01 UTC) #9
Lei Zhang
One more round of nit-picking. :) http://codereview.chromium.org/9363008/diff/13001/base/system_monitor/system_monitor.cc File base/system_monitor/system_monitor.cc (right): http://codereview.chromium.org/9363008/diff/13001/base/system_monitor/system_monitor.cc#newcode9 base/system_monitor/system_monitor.cc:9: #include "base/string_util.h" not ...
8 years, 10 months ago (2012-02-14 02:14:24 UTC) #10
willchan no longer on Chromium
I'm only going to review the interface and make sure the implementation isn't doing something ...
8 years, 10 months ago (2012-02-14 06:43:20 UTC) #11
vandebo (ex-Chrome)
On 2012/02/14 06:43:20, willchan wrote: > I'm only going to review the interface and make ...
8 years, 10 months ago (2012-02-14 21:23:23 UTC) #12
tpayne
http://codereview.chromium.org/9363008/diff/24002/base/system_monitor/system_monitor_unittest.cc File base/system_monitor/system_monitor_unittest.cc (right): http://codereview.chromium.org/9363008/diff/24002/base/system_monitor/system_monitor_unittest.cc#newcode93 base/system_monitor/system_monitor_unittest.cc:93: class DevicesChangedTest : public SystemMonitor::DevicesChangedObserver { As mentioned on ...
8 years, 10 months ago (2012-02-15 00:56:30 UTC) #13
vandebo (ex-Chrome)
https://chromiumcodereview.appspot.com/9363008/diff/24002/base/system_monitor/system_monitor_unittest.cc File base/system_monitor/system_monitor_unittest.cc (right): https://chromiumcodereview.appspot.com/9363008/diff/24002/base/system_monitor/system_monitor_unittest.cc#newcode93 base/system_monitor/system_monitor_unittest.cc:93: class DevicesChangedTest : public SystemMonitor::DevicesChangedObserver { On 2012/02/15 00:56:30, ...
8 years, 10 months ago (2012-02-15 22:28:25 UTC) #14
Lei Zhang
LGTM with comments below: Please forward declare FilePath if possible, per in-person discussion. https://chromiumcodereview.appspot.com/9363008/diff/13001/base/system_monitor/system_monitor.cc File ...
8 years, 10 months ago (2012-02-15 22:55:45 UTC) #15
vandebo (ex-Chrome)
will, LG? https://chromiumcodereview.appspot.com/9363008/diff/13001/base/system_monitor/system_monitor.cc File base/system_monitor/system_monitor.cc (right): https://chromiumcodereview.appspot.com/9363008/diff/13001/base/system_monitor/system_monitor.cc#newcode150 base/system_monitor/system_monitor.cc:150: void SystemMonitor::BatteryCheck() { On 2012/02/15 22:55:45, Lei ...
8 years, 10 months ago (2012-02-15 23:13:36 UTC) #16
Lei Zhang
http://codereview.chromium.org/9363008/diff/33005/base/system_monitor/system_monitor.cc File base/system_monitor/system_monitor.cc (right): http://codereview.chromium.org/9363008/diff/33005/base/system_monitor/system_monitor.cc#newcode151 base/system_monitor/system_monitor.cc:151: #if defined(ENABLE_BATTERY_MONITORING) I meant putting the #if around the ...
8 years, 10 months ago (2012-02-15 23:43:36 UTC) #17
willchan no longer on Chromium
lgtm
8 years, 10 months ago (2012-02-15 23:52:48 UTC) #18
tpayne
http://codereview.chromium.org/9363008/diff/31006/base/base.gyp File base/base.gyp (right): http://codereview.chromium.org/9363008/diff/31006/base/base.gyp#newcode224 base/base.gyp:224: 'system_monitor/mock_devices_changed_observer.cc', These should be added to test_support_base. Personally, I ...
8 years, 10 months ago (2012-02-17 20:41:11 UTC) #19
vandebo (ex-Chrome)
avi, Most of the new mac code is moved into content/browser/ PTAL http://codereview.chromium.org/9363008/diff/31006/base/base.gyp File base/base.gyp ...
8 years, 10 months ago (2012-02-25 00:50:13 UTC) #20
Avi (use Gerrit)
I'm not entirely convinced content is the place where this belongs; including John. For my ...
8 years, 10 months ago (2012-02-25 22:13:00 UTC) #21
vandebo (ex-Chrome)
On 2012/02/25 22:13:00, Avi wrote: > I'm not entirely convinced content is the place where ...
8 years, 10 months ago (2012-02-28 00:51:33 UTC) #22
Avi (use Gerrit)
On 2012/02/28 00:51:33, vandebo wrote: > I'm not sure this is the perfect place for ...
8 years, 9 months ago (2012-02-28 01:26:35 UTC) #23
Avi (use Gerrit)
http://codereview.chromium.org/9363008/diff/37001/content/browser/mac/media_device_notifications.mm File content/browser/mac/media_device_notifications.mm (right): http://codereview.chromium.org/9363008/diff/37001/content/browser/mac/media_device_notifications.mm#newcode1 content/browser/mac/media_device_notifications.mm:1: // Copyright (c) 2012 The Chromium Authors. All rights ...
8 years, 9 months ago (2012-02-28 01:26:45 UTC) #24
jam
On 2012/02/28 00:51:33, vandebo wrote: > On 2012/02/25 22:13:00, Avi wrote: > > I'm not ...
8 years, 9 months ago (2012-02-28 01:48:07 UTC) #25
Lei Zhang
On 2012/02/28 01:48:07, John Abd-El-Malek wrote: > On 2012/02/28 00:51:33, vandebo wrote: > > On ...
8 years, 9 months ago (2012-02-28 02:14:13 UTC) #26
vandebo (ex-Chrome)
On 2012/02/28 01:26:35, Avi wrote: > On 2012/02/28 00:51:33, vandebo wrote: > > I'm not ...
8 years, 9 months ago (2012-02-28 18:31:25 UTC) #27
vandebo (ex-Chrome)
On 2012/02/28 01:48:07, John Abd-El-Malek wrote: > On 2012/02/28 00:51:33, vandebo wrote: > > On ...
8 years, 9 months ago (2012-02-28 18:31:59 UTC) #28
vandebo (ex-Chrome)
Thanks for the comments and your patience. https://chromiumcodereview.appspot.com/9363008/diff/37001/content/browser/mac/media_device_notifications.mm File content/browser/mac/media_device_notifications.mm (right): https://chromiumcodereview.appspot.com/9363008/diff/37001/content/browser/mac/media_device_notifications.mm#newcode89 content/browser/mac/media_device_notifications.mm:89: CFArrayRef events_of_interest ...
8 years, 9 months ago (2012-02-28 18:35:04 UTC) #29
Avi (use Gerrit)
lgtm https://chromiumcodereview.appspot.com/9363008/diff/49001/content/browser/mac/media_device_notifications.mm File content/browser/mac/media_device_notifications.mm (right): https://chromiumcodereview.appspot.com/9363008/diff/49001/content/browser/mac/media_device_notifications.mm#newcode78 content/browser/mac/media_device_notifications.mm:78: path(CopyMountPointFromBSDName(device)); Can this fit on one line?
8 years, 9 months ago (2012-02-28 19:19:59 UTC) #30
vandebo (ex-Chrome)
Thanks https://chromiumcodereview.appspot.com/9363008/diff/49001/content/browser/mac/media_device_notifications.mm File content/browser/mac/media_device_notifications.mm (right): https://chromiumcodereview.appspot.com/9363008/diff/49001/content/browser/mac/media_device_notifications.mm#newcode78 content/browser/mac/media_device_notifications.mm:78: path(CopyMountPointFromBSDName(device)); On 2012/02/28 19:19:59, Avi wrote: > Can ...
8 years, 9 months ago (2012-02-28 19:24:45 UTC) #31
tpayne
https://chromiumcodereview.appspot.com/9363008/diff/49001/base/system_monitor/system_monitor.h File base/system_monitor/system_monitor.h (right): https://chromiumcodereview.appspot.com/9363008/diff/49001/base/system_monitor/system_monitor.h#newcode104 base/system_monitor/system_monitor.h:104: // if triggered. typo (is)
8 years, 9 months ago (2012-02-28 19:31:42 UTC) #32
vandebo (ex-Chrome)
https://chromiumcodereview.appspot.com/9363008/diff/49001/base/system_monitor/system_monitor.h File base/system_monitor/system_monitor.h (right): https://chromiumcodereview.appspot.com/9363008/diff/49001/base/system_monitor/system_monitor.h#newcode104 base/system_monitor/system_monitor.h:104: // if triggered. On 2012/02/28 19:31:42, tpayne wrote: > ...
8 years, 9 months ago (2012-02-28 20:36:10 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vandebo@chromium.org/9363008/57002
8 years, 9 months ago (2012-02-28 21:18:17 UTC) #34
commit-bot: I haz the power
Try job failure for 9363008-57002 (retry) on linux_rel for step "browser_tests". It's a second try, ...
8 years, 9 months ago (2012-02-28 22:29:59 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vandebo@chromium.org/9363008/57002
8 years, 9 months ago (2012-02-28 22:31:58 UTC) #36
commit-bot: I haz the power
Try job failure for 9363008-57002 (retry) on mac_rel for step "browser_tests". It's a second try, ...
8 years, 9 months ago (2012-02-29 00:25:17 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vandebo@chromium.org/9363008/57002
8 years, 9 months ago (2012-02-29 00:27:02 UTC) #38
commit-bot: I haz the power
Try job failure for 9363008-57002 (retry) (retry) on mac_rel for step "browser_tests". It's a second ...
8 years, 9 months ago (2012-02-29 05:20:13 UTC) #39
Lei Zhang
On 2012/02/29 05:20:13, I haz the power (commit-bot) wrote: > Try job failure for 9363008-57002 ...
8 years, 9 months ago (2012-02-29 06:17:13 UTC) #40
vandebo (ex-Chrome)
On 2012/02/29 06:17:13, Lei Zhang wrote: > Doh. Well, there's your chance to fix the ...
8 years, 9 months ago (2012-02-29 19:56:09 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vandebo@chromium.org/9363008/61003
8 years, 9 months ago (2012-02-29 19:56:35 UTC) #42
commit-bot: I haz the power
Try job failure for 9363008-61003 (retry) on win_rel for step "compile" (clobber build). It's a ...
8 years, 9 months ago (2012-02-29 20:27:50 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vandebo@chromium.org/9363008/65002
8 years, 9 months ago (2012-02-29 20:33:26 UTC) #44
commit-bot: I haz the power
Try job failure for 9363008-65002 (retry) on mac_rel for step "browser_tests". It's a second try, ...
8 years, 9 months ago (2012-02-29 22:33:43 UTC) #45
jam
btw those are the only two files in content/browser/mac now. do we still want to ...
8 years, 9 months ago (2012-03-01 02:03:30 UTC) #46
vandebo (ex-Chrome)
8 years, 9 months ago (2012-03-02 18:29:05 UTC) #47
On 2012/03/01 02:03:30, John Abd-El-Malek wrote:
> btw those are the only two files in content/browser/mac now. do we still want
to
> keep that directory or should we move these to content/browser?

FYI - I tried to put this code in content to get rid of an oserr -600.  The
change got reverted because it popped up anyway, so the mac code will probably
land it base once I figure out the source of the -600 errors.

Powered by Google App Engine
This is Rietveld 408576698