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

Issue 10876101: Initial implementation of experimental SystemInfo.Storage API for Mac OS (Closed)

Created:
8 years, 3 months ago by joshuagl
Modified:
8 years, 3 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org, Mark Mentovai
Visibility:
Public.

Description

Initial implementation of experimental SystemInfo.Storage API for Mac OS This matches the current Windows implementation. BUG=141229, 145101 TEST=browser_tests --gtest_filter=SystemInfoStorageApiTest.* and manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=155777

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 18

Patch Set 5 : #

Total comments: 9

Patch Set 6 : #

Total comments: 5

Patch Set 7 : #

Total comments: 2

Patch Set 8 : #

Total comments: 2

Patch Set 9 : #

Patch Set 10 : #

Total comments: 2

Patch Set 11 : #

Total comments: 2

Patch Set 12 : #

Total comments: 9

Patch Set 13 : #

Patch Set 14 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -4 lines) Patch
M AUTHORS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/system_info_storage/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +105 lines, -4 lines 0 comments Download

Messages

Total messages: 42 (0 generated)
joshuagl
I thought it best to get some feedback ASAP on this CL as I'm new ...
8 years, 3 months ago (2012-08-28 02:32:30 UTC) #1
Hongbo Min
Joshua, my comment inlined, and add mihai for reviewing. http://codereview.chromium.org/10876101/diff/1/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc (right): http://codereview.chromium.org/10876101/diff/1/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc#newcode17 chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc:17: ...
8 years, 3 months ago (2012-08-28 07:42:26 UTC) #2
Hongbo Min
Mihai, Could you please review this patch? Thanks.
8 years, 3 months ago (2012-08-28 08:00:12 UTC) #3
joshuagl
Thanks Hongbo, I'll work through your suggestions today as well as fixing up the errors ...
8 years, 3 months ago (2012-08-28 16:01:41 UTC) #4
joshuagl
Took me a couple of goes to appease the linter but this latest change passes ...
8 years, 3 months ago (2012-08-28 18:00:04 UTC) #5
Robert Sesek
Mark may also have an opinion on the IOKit stuff. http://codereview.chromium.org/10876101/diff/5002/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc (right): http://codereview.chromium.org/10876101/diff/5002/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc#newcode56 ...
8 years, 3 months ago (2012-08-28 18:13:14 UTC) #6
joshuagl
Thanks for the very helpful review. I'll address your comments and get an updated patch ...
8 years, 3 months ago (2012-08-28 18:35:45 UTC) #7
joshuagl
An updated implementation integrating all feedback so far. Thanks all. http://codereview.chromium.org/10876101/diff/5002/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc (right): http://codereview.chromium.org/10876101/diff/5002/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc#newcode56 ...
8 years, 3 months ago (2012-08-28 21:55:34 UTC) #8
Hongbo Min
Generally, we can avoid call StorageType multiple times. http://codereview.chromium.org/10876101/diff/13001/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc (right): http://codereview.chromium.org/10876101/diff/13001/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc#newcode42 chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc:42: std::string ...
8 years, 3 months ago (2012-08-29 02:38:02 UTC) #9
joshuagl
Thanks Hongbo, you're quite right - building the map before iterating the devices makes much ...
8 years, 3 months ago (2012-08-29 03:19:48 UTC) #10
Hongbo Min
http://codereview.chromium.org/10876101/diff/6005/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc (right): http://codereview.chromium.org/10876101/diff/6005/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc#newcode71 chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc:71: int num_volumes = getmntinfo(&mounted_volumes, 0); getmntinfo gets called multiple ...
8 years, 3 months ago (2012-08-29 10:12:15 UTC) #11
joshuagl
Thanks again Hongbo. My only outstanding (minor) concern about the CL at this point is ...
8 years, 3 months ago (2012-08-29 17:36:19 UTC) #12
Hongbo Min
http://codereview.chromium.org/10876101/diff/6007/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc (right): http://codereview.chromium.org/10876101/diff/6007/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc#newcode77 chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc:77: info->type = dev_to_removable_map_[volume_dev]; If you are concerning about no ...
8 years, 3 months ago (2012-08-30 00:13:32 UTC) #13
joshuagl
OK, I've addressed my own nit here. And in the process discovered the kIOMasterPortDefault constant ...
8 years, 3 months ago (2012-08-30 00:33:42 UTC) #14
Hongbo Min
http://codereview.chromium.org/10876101/diff/16001/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc (right): http://codereview.chromium.org/10876101/diff/16001/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc#newcode77 chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc:77: std::string type = dev_to_removable_map_[volume_dev]; Since QueryUnitInfo is exposed as ...
8 years, 3 months ago (2012-08-30 07:40:05 UTC) #15
joshuagl
Here's another iteration which addresses Hongbo's concern on the public QueryUnitInfo() method being called before ...
8 years, 3 months ago (2012-08-30 18:53:12 UTC) #16
Hongbo Min
http://codereview.chromium.org/10876101/diff/21001/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc (right): http://codereview.chromium.org/10876101/diff/21001/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc#newcode74 chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc:74: if (dev_to_removable_map_.empty()) how to about checking whether the dev_to_removable_map_ ...
8 years, 3 months ago (2012-08-31 00:01:47 UTC) #17
vandebo (ex-Chrome)
It looks like some of this code will also be useful in the system monitor ...
8 years, 3 months ago (2012-08-31 17:03:51 UTC) #18
joshuagl
This revision accounts for changes in the storage IDL definition and addresses Hongbo's review comments. ...
8 years, 3 months ago (2012-08-31 20:34:52 UTC) #19
Hongbo Min
On 2012/08/31 20:34:52, joshuagl wrote: > This revision accounts for changes in the storage IDL ...
8 years, 3 months ago (2012-08-31 23:58:38 UTC) #20
Mihai Parparita -not on Chrome
LGTM, though I'd like Robert to have another look too. http://codereview.chromium.org/10876101/diff/16003/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc (right): http://codereview.chromium.org/10876101/diff/16003/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc#newcode42 ...
8 years, 3 months ago (2012-09-01 00:27:21 UTC) #21
joshuagl
Thanks Mihai, map renamed to dev_path_to_type_map_ http://codereview.chromium.org/10876101/diff/16003/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc (right): http://codereview.chromium.org/10876101/diff/16003/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc#newcode42 chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc:42: std::map<std::string, std::string> dev_to_removable_map_; ...
8 years, 3 months ago (2012-09-01 00:45:55 UTC) #22
Robert Sesek
Just a few more comments. http://codereview.chromium.org/10876101/diff/26001/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc (right): http://codereview.chromium.org/10876101/diff/26001/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc#newcode55 chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc:55: for (int i = ...
8 years, 3 months ago (2012-09-04 16:42:20 UTC) #23
joshuagl
Updated for rsesek's review. Thanks. http://codereview.chromium.org/10876101/diff/26001/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc (right): http://codereview.chromium.org/10876101/diff/26001/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc#newcode55 chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc:55: for (int i = ...
8 years, 3 months ago (2012-09-04 17:19:13 UTC) #24
Robert Sesek
LGTM
8 years, 3 months ago (2012-09-05 15:19:40 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joshua.lock@intel.com/10876101/18003
8 years, 3 months ago (2012-09-07 23:39:37 UTC) #26
commit-bot: I haz the power
Presubmit check for 10876101-18003 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 3 months ago (2012-09-07 23:39:40 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joshua.lock@intel.com/10876101/18003
8 years, 3 months ago (2012-09-07 23:40:16 UTC) #28
commit-bot: I haz the power
Presubmit check for 10876101-18003 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 3 months ago (2012-09-07 23:40:18 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joshua.lock@intel.com/10876101/18003
8 years, 3 months ago (2012-09-07 23:41:25 UTC) #30
commit-bot: I haz the power
Presubmit check for 10876101-18003 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 3 months ago (2012-09-07 23:41:28 UTC) #31
joshuagl
Checking 'commit' box
8 years, 3 months ago (2012-09-07 23:41:32 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joshua.lock@intel.com/10876101/18003
8 years, 3 months ago (2012-09-07 23:41:45 UTC) #33
commit-bot: I haz the power
Presubmit check for 10876101-18003 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 3 months ago (2012-09-07 23:41:47 UTC) #34
Robert Sesek
Read the error message, please.
8 years, 3 months ago (2012-09-07 23:51:07 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joshua.lock@intel.com/10876101/25003
8 years, 3 months ago (2012-09-08 00:02:45 UTC) #36
Robert Sesek
Did you sign the CLA? I don't see your name there. Please don't tick the ...
8 years, 3 months ago (2012-09-08 00:07:20 UTC) #37
joshuagl
On 2012/09/08 00:07:20, rsesek wrote: > Did you sign the CLA? I don't see your ...
8 years, 3 months ago (2012-09-08 00:10:22 UTC) #38
Mark Mentovai
Yes, you are approved under Intel’s corporate CLA. Please add yourself to the AUTHORS file. ...
8 years, 3 months ago (2012-09-08 02:18:04 UTC) #39
Robert Sesek
Thanks for checking, Mark. I still don't see him in the spreadsheet, but this is ...
8 years, 3 months ago (2012-09-10 15:13:43 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joshua.lock@intel.com/10876101/25003
8 years, 3 months ago (2012-09-10 16:19:21 UTC) #41
commit-bot: I haz the power
8 years, 3 months ago (2012-09-10 18:33:31 UTC) #42
Change committed as 155777

Powered by Google App Engine
This is Rietveld 408576698