Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Issue 10830003: Extract and dispatch device uuid in media device attached notification message. (Closed)

Created:
8 years, 5 months ago by kmadhusu
Modified:
8 years, 4 months ago
CC:
chromium-reviews, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

In order to manage device media gallery permissions, use a device id that is unique and persistent across device attachments. Therefore, extract device uuid from DiskInfo::InitializeFromResponse and use that identifier while dispatching media device attached notification event. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149099

Patch Set 1 #

Patch Set 2 : Test #

Patch Set 3 : Add LOG(ERROR) #

Patch Set 4 : Fix test. #

Patch Set 5 : Added debug statements. #

Patch Set 6 : Fix compile errors #

Patch Set 7 : Refactor #

Total comments: 6

Patch Set 8 : Address review comments #

Patch Set 9 : '' #

Total comments: 2

Patch Set 10 : Address review comments. #

Patch Set 11 : '' #

Total comments: 5

Patch Set 12 : Address review comments. #

Total comments: 2

Patch Set 13 : Fix histogram #

Patch Set 14 : Fix MediaDeviceNotificationsTest.BasicAttachDetach test. #

Patch Set 15 : Fix nits #

Total comments: 10

Patch Set 16 : Fixed nits #

Patch Set 17 : '' #

Patch Set 18 : Addressed review comments #

Patch Set 19 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -17 lines) Patch
M chrome/browser/chromeos/disks/disk_mount_manager.h View 1 2 3 4 5 6 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/disks/disk_mount_manager.cc View 1 2 3 4 5 6 3 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/disks/mock_disk_mount_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +11 lines, -0 lines 2 comments Download
M chrome/browser/chromeos/disks/mock_disk_mount_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +38 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_browser_private_apitest.cc View 1 2 3 5 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/media_gallery/media_device_notifications_chromeos.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/media_gallery/media_device_notifications_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +24 lines, -3 lines 0 comments Download
M chrome/browser/media_gallery/media_device_notifications_chromeos_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +20 lines, -9 lines 0 comments Download
M chromeos/dbus/cros_disks_client.h View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M chromeos/dbus/cros_disks_client.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
Lei Zhang
http://codereview.chromium.org/10830003/diff/8002/chrome/browser/media_gallery/media_device_notifications_chromeos.cc File chrome/browser/media_gallery/media_device_notifications_chromeos.cc (right): http://codereview.chromium.org/10830003/diff/8002/chrome/browser/media_gallery/media_device_notifications_chromeos.cc#newcode113 chrome/browser/media_gallery/media_device_notifications_chromeos.cc:113: if (iter != disks.end()) { nit: would you mind ...
8 years, 5 months ago (2012-07-26 02:17:31 UTC) #1
kmadhusu
thestig: Addressed review comments. PTAL. Thanks. http://codereview.chromium.org/10830003/diff/8002/chrome/browser/media_gallery/media_device_notifications_chromeos.cc File chrome/browser/media_gallery/media_device_notifications_chromeos.cc (right): http://codereview.chromium.org/10830003/diff/8002/chrome/browser/media_gallery/media_device_notifications_chromeos.cc#newcode113 chrome/browser/media_gallery/media_device_notifications_chromeos.cc:113: if (iter != ...
8 years, 5 months ago (2012-07-26 17:01:23 UTC) #2
kmadhusu
benchan@: Please review chromeos code. Thanks.
8 years, 5 months ago (2012-07-26 17:02:01 UTC) #3
Ben Chan
This is just my preference: try to avoid using "we" / "I" in commit message. ...
8 years, 5 months ago (2012-07-26 17:11:18 UTC) #4
kmadhusu
benchan@: Addressed review comments. PTAL. Thanks. http://codereview.chromium.org/10830003/diff/11008/chrome/browser/media_gallery/media_device_notifications_chromeos.cc File chrome/browser/media_gallery/media_device_notifications_chromeos.cc (right): http://codereview.chromium.org/10830003/diff/11008/chrome/browser/media_gallery/media_device_notifications_chromeos.cc#newcode105 chrome/browser/media_gallery/media_device_notifications_chromeos.cc:105: // Get the ...
8 years, 5 months ago (2012-07-26 17:23:05 UTC) #5
Ben Chan
lgtm http://codereview.chromium.org/10830003/diff/4003/chrome/browser/media_gallery/media_device_notifications_chromeos.cc File chrome/browser/media_gallery/media_device_notifications_chromeos.cc (right): http://codereview.chromium.org/10830003/diff/4003/chrome/browser/media_gallery/media_device_notifications_chromeos.cc#newcode30 chrome/browser/media_gallery/media_device_notifications_chromeos.cc:30: device_id = disk.fs_uuid(); this may be simpler: if ...
8 years, 5 months ago (2012-07-26 17:56:03 UTC) #6
Lei Zhang
http://codereview.chromium.org/10830003/diff/4003/chrome/browser/media_gallery/media_device_notifications_chromeos.cc File chrome/browser/media_gallery/media_device_notifications_chromeos.cc (right): http://codereview.chromium.org/10830003/diff/4003/chrome/browser/media_gallery/media_device_notifications_chromeos.cc#newcode27 chrome/browser/media_gallery/media_device_notifications_chromeos.cc:27: std::string device_id; you can further simplify lines 27-32 to: ...
8 years, 5 months ago (2012-07-26 18:34:30 UTC) #7
kmadhusu
benchan@, thestig@: Addressed review comments. http://codereview.chromium.org/10830003/diff/4003/chrome/browser/media_gallery/media_device_notifications_chromeos.cc File chrome/browser/media_gallery/media_device_notifications_chromeos.cc (right): http://codereview.chromium.org/10830003/diff/4003/chrome/browser/media_gallery/media_device_notifications_chromeos.cc#newcode27 chrome/browser/media_gallery/media_device_notifications_chromeos.cc:27: std::string device_id; On 2012/07/26 ...
8 years, 5 months ago (2012-07-26 18:44:49 UTC) #8
Lei Zhang
lgtm
8 years, 5 months ago (2012-07-26 18:47:12 UTC) #9
jar (doing other things)
(Invited/requested) drive by review of histogram usage below. I think the histogram will probably contain ...
8 years, 4 months ago (2012-07-27 17:48:48 UTC) #10
kmadhusu
jar@: Addressed review comments. Thanks. http://codereview.chromium.org/10830003/diff/4005/chrome/browser/media_gallery/media_device_notifications_chromeos.cc File chrome/browser/media_gallery/media_device_notifications_chromeos.cc (right): http://codereview.chromium.org/10830003/diff/4005/chrome/browser/media_gallery/media_device_notifications_chromeos.cc#newcode121 chrome/browser/media_gallery/media_device_notifications_chromeos.cc:121: static base::Histogram* media_device_uuid_available(NULL); On ...
8 years, 4 months ago (2012-07-27 18:30:31 UTC) #11
jar (doing other things)
histogram call and usage LGTM (Though I did not read the surrounding code).
8 years, 4 months ago (2012-07-27 22:07:43 UTC) #12
kmadhusu
benchan@, thestig@: Modified mock_disk_mount_manager fix MediaDeviceNotificationsTest. PTAL. Thanks.
8 years, 4 months ago (2012-07-28 23:22:52 UTC) #13
Ben Chan
http://codereview.chromium.org/10830003/diff/2006/chrome/browser/chromeos/disks/mock_disk_mount_manager.cc File chrome/browser/chromeos/disks/mock_disk_mount_manager.cc (right): http://codereview.chromium.org/10830003/diff/2006/chrome/browser/chromeos/disks/mock_disk_mount_manager.cc#newcode161 chrome/browser/chromeos/disks/mock_disk_mount_manager.cc:161: Disk* disk = new DiskMountManager::Disk(std::string(mount_info.source_path), nit: remove the extra ...
8 years, 4 months ago (2012-07-30 22:03:59 UTC) #14
Lei Zhang
http://codereview.chromium.org/10830003/diff/2006/chrome/browser/chromeos/disks/mock_disk_mount_manager.cc File chrome/browser/chromeos/disks/mock_disk_mount_manager.cc (right): http://codereview.chromium.org/10830003/diff/2006/chrome/browser/chromeos/disks/mock_disk_mount_manager.cc#newcode98 chrome/browser/chromeos/disks/mock_disk_mount_manager.cc:98: std::string(kTestUuid), either this is correct and the change on ...
8 years, 4 months ago (2012-07-30 22:11:32 UTC) #15
kmadhusu
Addressed review comments. PTAL. Thanks. http://codereview.chromium.org/10830003/diff/2006/chrome/browser/chromeos/disks/mock_disk_mount_manager.cc File chrome/browser/chromeos/disks/mock_disk_mount_manager.cc (right): http://codereview.chromium.org/10830003/diff/2006/chrome/browser/chromeos/disks/mock_disk_mount_manager.cc#newcode98 chrome/browser/chromeos/disks/mock_disk_mount_manager.cc:98: std::string(kTestUuid), On 2012/07/30 22:11:32, ...
8 years, 4 months ago (2012-07-30 22:51:14 UTC) #16
kmadhusu
tbarzic: Please review chrome side disk manager code. Thanks.
8 years, 4 months ago (2012-07-30 22:51:49 UTC) #17
Lei Zhang
lgtm http://codereview.chromium.org/10830003/diff/15014/chrome/browser/chromeos/disks/mock_disk_mount_manager.h File chrome/browser/chromeos/disks/mock_disk_mount_manager.h (right): http://codereview.chromium.org/10830003/diff/15014/chrome/browser/chromeos/disks/mock_disk_mount_manager.h#newcode52 chrome/browser/chromeos/disks/mock_disk_mount_manager.h:52: // primarily for MediaDeviceNotificationsTest. You may want to ...
8 years, 4 months ago (2012-07-30 23:00:49 UTC) #18
kmadhusu
http://codereview.chromium.org/10830003/diff/15014/chrome/browser/chromeos/disks/mock_disk_mount_manager.h File chrome/browser/chromeos/disks/mock_disk_mount_manager.h (right): http://codereview.chromium.org/10830003/diff/15014/chrome/browser/chromeos/disks/mock_disk_mount_manager.h#newcode52 chrome/browser/chromeos/disks/mock_disk_mount_manager.h:52: // primarily for MediaDeviceNotificationsTest. On 2012/07/30 23:00:49, Lei Zhang ...
8 years, 4 months ago (2012-07-30 23:08:29 UTC) #19
tbarzic
lgtm
8 years, 4 months ago (2012-07-30 23:11:16 UTC) #20
Ben Chan
On 2012/07/30 23:11:16, tbarzic wrote: > lgtm lgtm
8 years, 4 months ago (2012-07-30 23:19:31 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/10830003/15014
8 years, 4 months ago (2012-07-30 23:21:17 UTC) #22
commit-bot: I haz the power
8 years, 4 months ago (2012-07-31 01:00:40 UTC) #23
Change committed as 149099

Powered by Google App Engine
This is Rietveld 408576698