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

Issue 11088012: [Win, MediaGallery] Enumerate and handle mtp device attach/detach events. (Closed)

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

Description

[Win, MediaGallery] Enumerate and handle media transfer protocol (windows portable) device attach/detach events. Added code to: (1) Enumerate attached portable mtp devices. (2) Handle new mtp device arrival and detach events. (3) Extract mtp device details such as friendly name, device storage unique id, etc. BUG=151679 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=165126

Patch Set 1 : '' #

Patch Set 2 : '' #

Total comments: 10

Patch Set 3 : Addressed review comments #

Total comments: 71

Patch Set 4 : '' #

Patch Set 5 : Addressed review comments #

Total comments: 104

Patch Set 6 : Removed StringPrintf() #

Total comments: 34

Patch Set 7 : Addressed comments. #

Total comments: 6

Patch Set 8 : Addressed review comments #

Total comments: 97

Patch Set 9 : Addressed review comments #

Total comments: 60

Patch Set 10 : Addressed review comments #

Patch Set 11 : Rebase #

Total comments: 2

Patch Set 12 : Fixed nit. #

Patch Set 13 : Rebase #

Total comments: 5

Patch Set 14 : Declared loop variables in the for loop. #

Total comments: 2

Patch Set 15 : Rename storage_iter => storage_map_iter #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1179 lines, -153 lines) Patch
A chrome/browser/system_monitor/portable_device_watcher_win.h View 1 2 3 4 5 6 7 8 9 1 chunk +120 lines, -0 lines 0 comments Download
A chrome/browser/system_monitor/portable_device_watcher_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +611 lines, -0 lines 0 comments Download
M chrome/browser/system_monitor/removable_device_constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/system_monitor/removable_device_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/system_monitor/removable_device_notifications_window_win.h View 1 2 3 4 5 6 7 8 9 3 chunks +17 lines, -6 lines 0 comments Download
M chrome/browser/system_monitor/removable_device_notifications_window_win.cc View 1 2 3 4 5 6 7 8 9 7 chunks +28 lines, -17 lines 0 comments Download
M chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 chunks +391 lines, -130 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (0 generated)
kmadhusu
8 years, 2 months ago (2012-10-16 00:58:54 UTC) #1
vandebo (ex-Chrome)
https://codereview.chromium.org/11088012/diff/8023/chrome/browser/system_monitor/media_transfer_protocol_device_observer_win.cc File chrome/browser/system_monitor/media_transfer_protocol_device_observer_win.cc (right): https://codereview.chromium.org/11088012/diff/8023/chrome/browser/system_monitor/media_transfer_protocol_device_observer_win.cc#newcode138 chrome/browser/system_monitor/media_transfer_protocol_device_observer_win.cc:138: bool SetupConnection(LPWSTR pnp_device_id, nit: SetUp https://codereview.chromium.org/11088012/diff/8023/chrome/browser/system_monitor/media_transfer_protocol_device_observer_win.cc#newcode380 chrome/browser/system_monitor/media_transfer_protocol_device_observer_win.cc:380: EnumerateStoragesOnBlockingThread, this)); ...
8 years, 2 months ago (2012-10-16 17:42:36 UTC) #2
kmadhusu
vandebo@: Addressed review comments. PTAL. Thanks. http://codereview.chromium.org/11088012/diff/8023/chrome/browser/system_monitor/media_transfer_protocol_device_observer_win.cc File chrome/browser/system_monitor/media_transfer_protocol_device_observer_win.cc (right): http://codereview.chromium.org/11088012/diff/8023/chrome/browser/system_monitor/media_transfer_protocol_device_observer_win.cc#newcode138 chrome/browser/system_monitor/media_transfer_protocol_device_observer_win.cc:138: bool SetupConnection(LPWSTR pnp_device_id, ...
8 years, 2 months ago (2012-10-19 04:01:38 UTC) #3
kmadhusu
(Adding jam@ as reviewer) jam@: Can you please review windows specific code (ScopedComPtr, ScopedComMem, portable ...
8 years, 2 months ago (2012-10-19 04:02:08 UTC) #4
jam
I'm too overloaded with reviews in content/, please redirect.
8 years, 2 months ago (2012-10-19 16:40:04 UTC) #5
jam
btw I suggest one of pkasting (who's been doing work with the scoped windows objects ...
8 years, 2 months ago (2012-10-19 16:40:53 UTC) #6
kmadhusu
(Adding pkasting@ as reviewer) pkasting@: Can you please review windows specific code (ScopedComPtr, ScopedComMem, portable ...
8 years, 2 months ago (2012-10-19 17:11:47 UTC) #7
Peter Kasting
https://codereview.chromium.org/11088012/diff/15004/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): https://codereview.chromium.org/11088012/diff/15004/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode31 chrome/browser/system_monitor/portable_device_watcher_win.cc:31: using content::BrowserThread; Please avoid using statements unless they save ...
8 years, 2 months ago (2012-10-19 21:31:11 UTC) #8
kmadhusu
pkasting: Addressed review comments. PTAL. Thanks. http://codereview.chromium.org/11088012/diff/15004/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/15004/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode31 chrome/browser/system_monitor/portable_device_watcher_win.cc:31: using content::BrowserThread; On ...
8 years, 2 months ago (2012-10-23 23:44:16 UTC) #9
Peter Kasting
Haven't re-reviewed, just responding to a few comments. http://codereview.chromium.org/11088012/diff/15004/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/15004/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode43 chrome/browser/system_monitor/portable_device_watcher_win.cc:43: broadcast_hdr->dbch_devicetype ...
8 years, 2 months ago (2012-10-24 00:06:32 UTC) #10
kmadhusu
Addressed review comments. Please refer to my inline reply to your comments. Thanks. On 2012/10/24 ...
8 years, 2 months ago (2012-10-24 22:53:01 UTC) #11
Peter Kasting
On 2012/10/24 22:53:01, kmadhusu wrote: > > > I would like to leave it as ...
8 years, 2 months ago (2012-10-24 23:00:59 UTC) #12
kmadhusu
On 2012/10/24 23:00:59, Peter Kasting wrote: > On 2012/10/24 22:53:01, kmadhusu wrote: > > > ...
8 years, 2 months ago (2012-10-25 01:44:26 UTC) #13
Peter Kasting
On 2012/10/25 01:44:26, kmadhusu wrote: > Other reviewers insisted me to use > StringPrintf() in ...
8 years, 1 month ago (2012-10-25 04:01:24 UTC) #14
Peter Kasting
Was I supposed to review anything other than portable_device_watcher_win.*? Based on the number of comments ...
8 years, 1 month ago (2012-10-25 05:23:24 UTC) #15
vandebo (ex-Chrome)
Minor stuff... http://codereview.chromium.org/11088012/diff/47010/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/47010/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode160 chrome/browser/system_monitor/portable_device_watcher_win.cc:160: bool Setup(const string16& pnp_device_id, nit: SetUp http://codereview.chromium.org/11088012/diff/47010/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode184 ...
8 years, 1 month ago (2012-10-25 19:24:47 UTC) #16
kmadhusu
pkasting@, vandebo@: Addressed review comments. PTAL. Thanks. http://codereview.chromium.org/11088012/diff/42001/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/42001/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode59 chrome/browser/system_monitor/portable_device_watcher_win.cc:59: return StringToLowerASCII(string16(dev_interface->dbcc_name)); ...
8 years, 1 month ago (2012-10-26 02:01:24 UTC) #17
Peter Kasting
http://codereview.chromium.org/11088012/diff/42001/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/42001/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode59 chrome/browser/system_monitor/portable_device_watcher_win.cc:59: return StringToLowerASCII(string16(dev_interface->dbcc_name)); On 2012/10/26 02:01:24, kmadhusu wrote: > On ...
8 years, 1 month ago (2012-10-26 02:14:49 UTC) #18
brettw
I think we're trying to use the chrome namespace more, so I'd use it if ...
8 years, 1 month ago (2012-10-26 19:25:41 UTC) #19
vandebo (ex-Chrome)
http://codereview.chromium.org/11088012/diff/42001/chrome/browser/system_monitor/portable_device_watcher_win.h File chrome/browser/system_monitor/portable_device_watcher_win.h (right): http://codereview.chromium.org/11088012/diff/42001/chrome/browser/system_monitor/portable_device_watcher_win.h#newcode121 chrome/browser/system_monitor/portable_device_watcher_win.h:121: // Used to notify PortableDeviceWatcherWin about the shutdown sequence. ...
8 years, 1 month ago (2012-10-26 20:32:09 UTC) #20
kmadhusu
pkasting@, vandebo@: Addressed review comments. PTAL. Thanks. http://codereview.chromium.org/11088012/diff/42001/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/42001/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode59 chrome/browser/system_monitor/portable_device_watcher_win.cc:59: return StringToLowerASCII(string16(dev_interface->dbcc_name)); ...
8 years, 1 month ago (2012-10-26 22:23:26 UTC) #21
Peter Kasting
http://codereview.chromium.org/11088012/diff/42001/chrome/browser/system_monitor/portable_device_watcher_win.h File chrome/browser/system_monitor/portable_device_watcher_win.h (right): http://codereview.chromium.org/11088012/diff/42001/chrome/browser/system_monitor/portable_device_watcher_win.h#newcode28 chrome/browser/system_monitor/portable_device_watcher_win.h:28: namespace chrome { On 2012/10/26 22:23:26, kmadhusu wrote: > ...
8 years, 1 month ago (2012-10-26 22:35:34 UTC) #22
kmadhusu
On 2012/10/26 22:35:34, Peter Kasting wrote: > http://codereview.chromium.org/11088012/diff/42001/chrome/browser/system_monitor/portable_device_watcher_win.h > File chrome/browser/system_monitor/portable_device_watcher_win.h (right): > > http://codereview.chromium.org/11088012/diff/42001/chrome/browser/system_monitor/portable_device_watcher_win.h#newcode28 ...
8 years, 1 month ago (2012-10-26 22:37:32 UTC) #23
Peter Kasting
This is getting pretty close. http://codereview.chromium.org/11088012/diff/64002/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/64002/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode75 chrome/browser/system_monitor/portable_device_watcher_win.cc:75: return SUCCEEDED(hr) ? !name->empty() ...
8 years, 1 month ago (2012-10-26 23:46:23 UTC) #24
brettw
Removing myself, it seems like this is not ready for owners review yet.
8 years, 1 month ago (2012-10-27 19:03:59 UTC) #25
kmadhusu
pkasting@: Addressed review comments. PTAL. Thanks. http://codereview.chromium.org/11088012/diff/64002/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/64002/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode75 chrome/browser/system_monitor/portable_device_watcher_win.cc:75: return SUCCEEDED(hr) ? ...
8 years, 1 month ago (2012-10-28 22:57:16 UTC) #26
Peter Kasting
http://codereview.chromium.org/11088012/diff/64002/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/64002/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode299 chrome/browser/system_monitor/portable_device_watcher_win.cc:299: ((device_name[0] >= L'A') && (device_name[0] <= L'Z') || On ...
8 years, 1 month ago (2012-10-29 20:41:33 UTC) #27
Peter Kasting
LGTM with conversion to PostTaskAndReplyWithResult http://codereview.chromium.org/11088012/diff/70004/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/70004/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode247 chrome/browser/system_monitor/portable_device_watcher_win.cc:247: string16 unique_id(storage_id + L':' ...
8 years, 1 month ago (2012-10-29 21:57:19 UTC) #28
kmadhusu
pkasting@: Addressed review comments. PTAL. Thanks. http://codereview.chromium.org/11088012/diff/64002/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/64002/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode320 chrome/browser/system_monitor/portable_device_watcher_win.cc:320: // runner. On ...
8 years, 1 month ago (2012-10-30 01:29:24 UTC) #29
vandebo (ex-Chrome)
LGTM http://codereview.chromium.org/11088012/diff/72006/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/72006/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode6 chrome/browser/system_monitor/portable_device_watcher_win.cc:6: // complete. Those tasks should be run on ...
8 years, 1 month ago (2012-10-30 21:54:24 UTC) #30
kmadhusu
vandebo@: Fixed nit. Thanks. http://codereview.chromium.org/11088012/diff/72006/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/72006/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode6 chrome/browser/system_monitor/portable_device_watcher_win.cc:6: // complete. Those tasks should ...
8 years, 1 month ago (2012-10-30 22:02:58 UTC) #31
kmadhusu
thestig@: Could you press an owner's stamp for chrome/ changes? Thanks.
8 years, 1 month ago (2012-10-30 22:30:57 UTC) #32
Lei Zhang
lgtm with a couple nits: http://codereview.chromium.org/11088012/diff/79014/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/79014/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode599 chrome/browser/system_monitor/portable_device_watcher_win.cc:599: StorageObjects::const_iterator storage_object_iter = storage_objects.begin(); ...
8 years, 1 month ago (2012-10-30 22:46:03 UTC) #33
kmadhusu
thestig@: Addressed review comments. Thanks. http://codereview.chromium.org/11088012/diff/79014/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/79014/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode599 chrome/browser/system_monitor/portable_device_watcher_win.cc:599: StorageObjects::const_iterator storage_object_iter = storage_objects.begin(); ...
8 years, 1 month ago (2012-10-30 23:00:16 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kmadhusu@chromium.org/11088012/79014
8 years, 1 month ago (2012-10-30 23:04:13 UTC) #35
Peter Kasting
Looks like thestig found another instance of my comment below http://codereview.chromium.org/11088012/diff/70004/chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc File chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc (right): http://codereview.chromium.org/11088012/diff/70004/chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc#newcode162 ...
8 years, 1 month ago (2012-10-30 23:17:52 UTC) #36
kmadhusu
http://codereview.chromium.org/11088012/diff/70004/chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc File chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc (right): http://codereview.chromium.org/11088012/diff/70004/chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc#newcode162 chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc:162: storage_object_ids.begin(); On 2012/10/30 23:17:52, Peter Kasting wrote: > On ...
8 years, 1 month ago (2012-10-30 23:49:50 UTC) #37
Peter Kasting
Sure, LGTM http://codereview.chromium.org/11088012/diff/81008/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/81008/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode602 chrome/browser/system_monitor/portable_device_watcher_win.cc:602: MTPStorageMap::iterator storage_iter = storage_map_.find(storage_id); Nit: Might want ...
8 years, 1 month ago (2012-10-30 23:58:32 UTC) #38
kmadhusu
http://codereview.chromium.org/11088012/diff/81008/chrome/browser/system_monitor/portable_device_watcher_win.cc File chrome/browser/system_monitor/portable_device_watcher_win.cc (right): http://codereview.chromium.org/11088012/diff/81008/chrome/browser/system_monitor/portable_device_watcher_win.cc#newcode602 chrome/browser/system_monitor/portable_device_watcher_win.cc:602: MTPStorageMap::iterator storage_iter = storage_map_.find(storage_id); On 2012/10/30 23:58:32, Peter Kasting ...
8 years, 1 month ago (2012-10-31 00:16:22 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kmadhusu@chromium.org/11088012/72016
8 years, 1 month ago (2012-10-31 00:18:28 UTC) #40
commit-bot: I haz the power
Retried try job too often for step(s) browser_tests
8 years, 1 month ago (2012-10-31 03:02:05 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kmadhusu@chromium.org/11088012/72016
8 years, 1 month ago (2012-10-31 06:15:38 UTC) #42
commit-bot: I haz the power
8 years, 1 month ago (2012-10-31 08:44:10 UTC) #43
Change committed as 165126

Powered by Google App Engine
This is Rietveld 408576698