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

Issue 10919185: Implement RemovableDeviceNotifications for Mac (Closed)

Created:
8 years, 3 months ago by sail
Modified:
8 years, 3 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Visibility:
Public.

Description

Implement RemovableDeviceNotifications for Mac This CL adds a class to monitor disks being added, removed or changed. When ever such events happen notifications are posted through base::SystemMonitor. BUG=110400, 110823 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157002

Patch Set 1 #

Patch Set 2 : fix threading #

Total comments: 36

Patch Set 3 : add tests and address review comments #

Patch Set 4 : fix device id #

Total comments: 6

Patch Set 5 : only check DCIM for removable #

Patch Set 6 : address review comments #

Total comments: 2

Patch Set 7 : address review comments #

Total comments: 11

Patch Set 8 : address review comments #

Patch Set 9 : address review comments #

Patch Set 10 : rebase #

Patch Set 11 : fix test #

Patch Set 12 : address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+602 lines, -0 lines) Patch
M base/mac/foundation_util.h View 2 chunks +4 lines, -0 lines 0 comments Download
M base/mac/foundation_util.mm View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/chrome_browser_main_mac.h View 1 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/chrome_browser_main_mac.mm View 1 3 chunks +10 lines, -0 lines 0 comments Download
A chrome/browser/system_monitor/disk_info_mac.h View 1 2 3 4 5 6 7 1 chunk +41 lines, -0 lines 0 comments Download
A chrome/browser/system_monitor/disk_info_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +105 lines, -0 lines 0 comments Download
A chrome/browser/system_monitor/removable_device_notifications_mac.h View 1 2 3 4 5 1 chunk +60 lines, -0 lines 0 comments Download
A chrome/browser/system_monitor/removable_device_notifications_mac.mm View 1 2 3 4 5 6 1 chunk +187 lines, -0 lines 0 comments Download
A chrome/browser/system_monitor/removable_device_notifications_mac_unittest.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +177 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 43 (0 generated)
sail
Hi Steve, here's a first shot at the Mac implementation. I'm still missing tests but ...
8 years, 3 months ago (2012-09-10 06:35:51 UTC) #1
Nico
Looks reasonable, but this is the first time I've see the DA api, so I'm ...
8 years, 3 months ago (2012-09-10 07:02:34 UTC) #2
vandebo (ex-Chrome)
On 2012/09/10 06:35:51, sail wrote: > Hi Steve, here's a first shot at the Mac ...
8 years, 3 months ago (2012-09-10 18:45:03 UTC) #3
sail
https://chromiumcodereview.appspot.com/10919185/diff/2001/chrome/browser/system_monitor/disk_info_mac.h File chrome/browser/system_monitor/disk_info_mac.h (right): https://chromiumcodereview.appspot.com/10919185/diff/2001/chrome/browser/system_monitor/disk_info_mac.h#newcode16 chrome/browser/system_monitor/disk_info_mac.h:16: // thread safe and must only be used from ...
8 years, 3 months ago (2012-09-10 21:58:43 UTC) #4
sail
+avi for DiskArbitration help. Hey Avi, we'd like to unique device ID that we can ...
8 years, 3 months ago (2012-09-10 22:00:44 UTC) #5
vandebo (ex-Chrome)
https://chromiumcodereview.appspot.com/10919185/diff/2001/chrome/browser/system_monitor/disk_info_mac.mm File chrome/browser/system_monitor/disk_info_mac.mm (right): https://chromiumcodereview.appspot.com/10919185/diff/2001/chrome/browser/system_monitor/disk_info_mac.mm#newcode84 chrome/browser/system_monitor/disk_info_mac.mm:84: unique_id = info.bsd_name_; On 2012/09/10 21:58:43, sail wrote: > ...
8 years, 3 months ago (2012-09-10 22:53:05 UTC) #6
Avi (use Gerrit)
I'm not sure what else I can say past what vandebo said. Plus if your ...
8 years, 3 months ago (2012-09-10 23:01:46 UTC) #7
sail
This CL should be ready to go. Please take a look. Added tests. Updated device ...
8 years, 3 months ago (2012-09-11 00:14:06 UTC) #8
vandebo (ex-Chrome)
https://chromiumcodereview.appspot.com/10919185/diff/2001/chrome/browser/system_monitor/removable_device_notifications_mac.h File chrome/browser/system_monitor/removable_device_notifications_mac.h (right): https://chromiumcodereview.appspot.com/10919185/diff/2001/chrome/browser/system_monitor/removable_device_notifications_mac.h#newcode24 chrome/browser/system_monitor/removable_device_notifications_mac.h:24: On 2012/09/10 18:45:03, vandebo wrote: > It's not part ...
8 years, 3 months ago (2012-09-11 00:45:50 UTC) #9
sail
https://chromiumcodereview.appspot.com/10919185/diff/2001/chrome/browser/system_monitor/removable_device_notifications_mac.h File chrome/browser/system_monitor/removable_device_notifications_mac.h (right): https://chromiumcodereview.appspot.com/10919185/diff/2001/chrome/browser/system_monitor/removable_device_notifications_mac.h#newcode24 chrome/browser/system_monitor/removable_device_notifications_mac.h:24: On 2012/09/11 00:45:50, vandebo wrote: > On 2012/09/10 18:45:03, ...
8 years, 3 months ago (2012-09-11 03:02:00 UTC) #10
vandebo (ex-Chrome)
LGTM https://chromiumcodereview.appspot.com/10919185/diff/6004/chrome/browser/system_monitor/removable_device_notifications_mac.mm File chrome/browser/system_monitor/removable_device_notifications_mac.mm (right): https://chromiumcodereview.appspot.com/10919185/diff/6004/chrome/browser/system_monitor/removable_device_notifications_mac.mm#newcode85 chrome/browser/system_monitor/removable_device_notifications_mac.mm:85: if (ShouldPostNotificationForDisk(it->second)) { nit: DCHECK(update_type == UPDATE_DEVICE_REMOVED || ...
8 years, 3 months ago (2012-09-11 17:08:17 UTC) #11
Avi (use Gerrit)
mac code lgtm
8 years, 3 months ago (2012-09-12 19:24:43 UTC) #12
sail
https://chromiumcodereview.appspot.com/10919185/diff/6004/chrome/browser/system_monitor/removable_device_notifications_mac.mm File chrome/browser/system_monitor/removable_device_notifications_mac.mm (right): https://chromiumcodereview.appspot.com/10919185/diff/6004/chrome/browser/system_monitor/removable_device_notifications_mac.mm#newcode85 chrome/browser/system_monitor/removable_device_notifications_mac.mm:85: if (ShouldPostNotificationForDisk(it->second)) { On 2012/09/11 17:08:17, vandebo wrote: > ...
8 years, 3 months ago (2012-09-12 20:56:32 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sail@chromium.org/10919185/10002
8 years, 3 months ago (2012-09-12 20:56:45 UTC) #14
commit-bot: I haz the power
Presubmit check for 10919185-10002 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 3 months ago (2012-09-12 20:56:59 UTC) #15
sail
+mark for base/ and base/mac OWNERS review
8 years, 3 months ago (2012-09-12 21:02:18 UTC) #16
vandebo (ex-Chrome)
+thestig for chrome/ changes
8 years, 3 months ago (2012-09-12 21:04:16 UTC) #17
Mark Mentovai
https://chromiumcodereview.appspot.com/10919185/diff/10002/base/sys_string_conversions_mac.mm File base/sys_string_conversions_mac.mm (right): https://chromiumcodereview.appspot.com/10919185/diff/10002/base/sys_string_conversions_mac.mm#newcode166 base/sys_string_conversions_mac.mm:166: if (!ref) This intentionally does not operate on NULL ...
8 years, 3 months ago (2012-09-12 21:05:15 UTC) #18
Mark Mentovai
https://chromiumcodereview.appspot.com/10919185/diff/10002/chrome/browser/system_monitor/disk_info_mac.h File chrome/browser/system_monitor/disk_info_mac.h (right): https://chromiumcodereview.appspot.com/10919185/diff/10002/chrome/browser/system_monitor/disk_info_mac.h#newcode27 chrome/browser/system_monitor/disk_info_mac.h:27: const string16 display_name() const { return display_name_; } Why ...
8 years, 3 months ago (2012-09-12 21:12:43 UTC) #19
Lei Zhang
On 2012/09/12 21:04:16, vandebo wrote: > +thestig for chrome/ changes I'd be happy to stamp ...
8 years, 3 months ago (2012-09-12 21:48:05 UTC) #20
sail
https://chromiumcodereview.appspot.com/10919185/diff/10002/base/sys_string_conversions_mac.mm File base/sys_string_conversions_mac.mm (right): https://chromiumcodereview.appspot.com/10919185/diff/10002/base/sys_string_conversions_mac.mm#newcode166 base/sys_string_conversions_mac.mm:166: if (!ref) On 2012/09/12 21:05:15, Mark Mentovai wrote: > ...
8 years, 3 months ago (2012-09-12 22:38:26 UTC) #21
Mark Mentovai
https://chromiumcodereview.appspot.com/10919185/diff/10002/base/sys_string_conversions_mac.mm File base/sys_string_conversions_mac.mm (right): https://chromiumcodereview.appspot.com/10919185/diff/10002/base/sys_string_conversions_mac.mm#newcode166 base/sys_string_conversions_mac.mm:166: if (!ref) sail wrote: > On 2012/09/12 21:05:15, Mark ...
8 years, 3 months ago (2012-09-12 22:45:26 UTC) #22
sail
https://chromiumcodereview.appspot.com/10919185/diff/10002/chrome/browser/system_monitor/disk_info_mac.mm File chrome/browser/system_monitor/disk_info_mac.mm (right): https://chromiumcodereview.appspot.com/10919185/diff/10002/chrome/browser/system_monitor/disk_info_mac.mm#newcode28 chrome/browser/system_monitor/disk_info_mac.mm:28: return name + ASCIIToUTF16(" ") + addition; On 2012/09/12 ...
8 years, 3 months ago (2012-09-12 22:50:26 UTC) #23
Mark Mentovai
LGTM
8 years, 3 months ago (2012-09-13 12:41:31 UTC) #24
Mark Mentovai
LGTM
8 years, 3 months ago (2012-09-13 12:41:34 UTC) #25
Lei Zhang
lgtm
8 years, 3 months ago (2012-09-13 18:22:14 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sail@chromium.org/10919185/13002
8 years, 3 months ago (2012-09-13 18:23:31 UTC) #27
commit-bot: I haz the power
Failed to apply patch for chrome/chrome_browser.gypi: While running patch -p1 --forward --force; patching file chrome/chrome_browser.gypi ...
8 years, 3 months ago (2012-09-13 18:23:36 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sail@chromium.org/10919185/11005
8 years, 3 months ago (2012-09-13 19:22:50 UTC) #29
commit-bot: I haz the power
Retried try job too often for step(s) sync_integration_tests
8 years, 3 months ago (2012-09-13 19:54:40 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sail@chromium.org/10919185/11005
8 years, 3 months ago (2012-09-13 19:58:35 UTC) #31
commit-bot: I haz the power
Retried try job too often for step(s) interactive_ui_tests
8 years, 3 months ago (2012-09-13 21:59:54 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sail@chromium.org/10919185/11005
8 years, 3 months ago (2012-09-14 01:10:31 UTC) #33
commit-bot: I haz the power
Retried try job too often for step(s) sync_integration_tests
8 years, 3 months ago (2012-09-14 01:43:28 UTC) #34
sail
On 2012/09/14 01:43:28, I haz the power (commit-bot) wrote: > Retried try job too often ...
8 years, 3 months ago (2012-09-14 01:54:42 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sail@chromium.org/10919185/12033
8 years, 3 months ago (2012-09-14 03:56:52 UTC) #36
commit-bot: I haz the power
Retried try job too often for step(s) sync_integration_tests
8 years, 3 months ago (2012-09-14 04:30:04 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sail@chromium.org/10919185/10020
8 years, 3 months ago (2012-09-14 20:11:20 UTC) #38
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build. Your ...
8 years, 3 months ago (2012-09-14 23:28:51 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sail@chromium.org/10919185/10020
8 years, 3 months ago (2012-09-15 06:38:57 UTC) #40
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build. Your ...
8 years, 3 months ago (2012-09-15 06:56:19 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sail@chromium.org/10919185/10020
8 years, 3 months ago (2012-09-15 07:33:30 UTC) #42
commit-bot: I haz the power
8 years, 3 months ago (2012-09-15 10:54:56 UTC) #43
Change committed as 157002

Powered by Google App Engine
This is Rietveld 408576698