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

Issue 10914060: Refine systemInfo.cpu API defintions and provide systemInfo.cpu.get impl for Windows and Linux (Closed)

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

Description

Refine systemInfo.cpu API and provide systemInfo.cpu.get impl for Windows and Linux. BUG=136519 TEST=browser_test --gtest_filter=SystemInfoCpuApiTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=155575

Patch Set 1 : #

Total comments: 6

Patch Set 2 : #

Total comments: 6

Patch Set 3 : #

Total comments: 7

Patch Set 4 : add impl for mac and ios #

Total comments: 10

Patch Set 5 : code refinement for mac and ios impl #

Total comments: 2

Patch Set 6 : use empty string instead unknown #

Total comments: 8

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -88 lines) Patch
M base/sys_info.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M base/sys_info_ios.mm View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M base/sys_info_linux.cc View 1 2 3 4 5 6 1 chunk +19 lines, -0 lines 0 comments Download
M base/sys_info_mac.cc View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M base/sys_info_win.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M base/win/windows_version.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -0 lines 0 comments Download
M base/win/windows_version.cc View 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h View 1 2 chunks +32 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.cc View 1 chunk +38 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_linux.cc View 1 chunk +2 lines, -21 lines 0 comments Download
M chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_mac.cc View 1 chunk +2 lines, -21 lines 0 comments Download
M chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_win.cc View 1 chunk +2 lines, -21 lines 0 comments Download
M chrome/browser/extensions/api/system_info_cpu/system_info_cpu_apitest.cc View 2 chunks +4 lines, -9 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/experimental_system_info_cpu.idl View 1 2 1 chunk +16 lines, -10 lines 0 comments Download
M chrome/test/data/extensions/api_test/systeminfo/cpu/test_cpuinfo_api.js View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -6 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
Hongbo Min
Mihai, Since the systemInfo.cpu API definition has some changes as described in https://docs.google.com/a/intel.com/document/pub?id=13RUe2D67p4bZx9UvDeGzh2u6ELNesujDfvHLOJlWKfY, this patch ...
8 years, 3 months ago (2012-09-03 14:53:02 UTC) #1
Mihai Parparita -not on Chrome
http://codereview.chromium.org/10914060/diff/3017/chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h File chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h (right): http://codereview.chromium.org/10914060/diff/3017/chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h#newcode26 chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h:26: // Start sampling the cpu usage. The callback gets ...
8 years, 3 months ago (2012-09-04 20:23:47 UTC) #2
Hongbo Min
Patch updated. Thanks. http://codereview.chromium.org/10914060/diff/3017/chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h File chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h (right): http://codereview.chromium.org/10914060/diff/3017/chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h#newcode26 chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h:26: // Start sampling the cpu usage. ...
8 years, 3 months ago (2012-09-05 05:31:03 UTC) #3
Hongbo Min
Mihai, If it looks good to you, please call out the reviewers for base and ...
8 years, 3 months ago (2012-09-05 14:31:50 UTC) #4
Mihai Parparita -not on Chrome
LGTM As for other OWNERS, Mark has looked at base/sys_info* in the past, and Scott ...
8 years, 3 months ago (2012-09-05 23:58:39 UTC) #5
sky
LGTM
8 years, 3 months ago (2012-09-06 00:09:22 UTC) #6
Hongbo Min
@willchan, please review the base changes.
8 years, 3 months ago (2012-09-06 01:15:39 UTC) #7
Hongbo Min
@mark, please help review. Thanks.
8 years, 3 months ago (2012-09-06 01:16:41 UTC) #8
Hongbo Min
http://codereview.chromium.org/10914060/diff/24/base/sys_info_linux.cc File base/sys_info_linux.cc (right): http://codereview.chromium.org/10914060/diff/24/base/sys_info_linux.cc#newcode58 base/sys_info_linux.cc:58: while(std::getline(iss, line)){ On 2012/09/05 23:58:39, Mihai Parparita wrote: > ...
8 years, 3 months ago (2012-09-06 01:43:53 UTC) #9
Mark Mentovai
What is the plan for other-OS support? Subsequent changes? Are you going to do it? ...
8 years, 3 months ago (2012-09-06 13:39:13 UTC) #10
Hongbo Min
On 2012/09/06 13:39:13, Mark Mentovai wrote: > What is the plan for other-OS support? Subsequent ...
8 years, 3 months ago (2012-09-06 13:43:04 UTC) #11
Hongbo Min
The patch is update accordingly. The other-OS you mean is android, or freebsd? http://codereview.chromium.org/10914060/diff/4013/base/sys_info_linux.cc File ...
8 years, 3 months ago (2012-09-06 14:09:09 UTC) #12
Mark Mentovai
I meant fully implementing the TODOs you left behind, like the CPU time thing for ...
8 years, 3 months ago (2012-09-06 14:11:48 UTC) #13
Hongbo Min
On 2012/09/06 14:11:48, Mark Mentovai wrote: > I meant fully implementing the TODOs you left ...
8 years, 3 months ago (2012-09-06 14:13:28 UTC) #14
Mark Mentovai
http://codereview.chromium.org/10914060/diff/7034/base/sys_info_ios.mm File base/sys_info_ios.mm (right): http://codereview.chromium.org/10914060/diff/7034/base/sys_info_ios.mm#newcode72 base/sys_info_ios.mm:72: sysctlbyname("machdep.cpu.brand_string", &model_name, &len, NULL, 0); Need to #include anything? ...
8 years, 3 months ago (2012-09-06 14:17:56 UTC) #15
Hongbo Min
Done. Pls have a review again. Thanks. http://codereview.chromium.org/10914060/diff/7034/base/sys_info_ios.mm File base/sys_info_ios.mm (right): http://codereview.chromium.org/10914060/diff/7034/base/sys_info_ios.mm#newcode72 base/sys_info_ios.mm:72: sysctlbyname("machdep.cpu.brand_string", &model_name, ...
8 years, 3 months ago (2012-09-06 14:33:45 UTC) #16
Mark Mentovai
http://codereview.chromium.org/10914060/diff/28/base/sys_info.h File base/sys_info.h (right): http://codereview.chromium.org/10914060/diff/28/base/sys_info.h#newcode58 base/sys_info.h:58: // Returns the CPU model name of the system. ...
8 years, 3 months ago (2012-09-06 14:38:14 UTC) #17
Hongbo Min
Agree. Thanks.
8 years, 3 months ago (2012-09-06 14:43:24 UTC) #18
Hongbo Min
http://codereview.chromium.org/10914060/diff/28/base/sys_info.h File base/sys_info.h (right): http://codereview.chromium.org/10914060/diff/28/base/sys_info.h#newcode58 base/sys_info.h:58: // Returns the CPU model name of the system. ...
8 years, 3 months ago (2012-09-06 14:45:00 UTC) #19
Mark Mentovai
LGTM otherwise. http://codereview.chromium.org/10914060/diff/14035/base/sys_info.h File base/sys_info.h (right): http://codereview.chromium.org/10914060/diff/14035/base/sys_info.h#newcode58 base/sys_info.h:58: // Returns the CPU model name of ...
8 years, 3 months ago (2012-09-06 14:45:17 UTC) #20
Hongbo Min
http://codereview.chromium.org/10914060/diff/14035/base/sys_info.h File base/sys_info.h (right): http://codereview.chromium.org/10914060/diff/14035/base/sys_info.h#newcode58 base/sys_info.h:58: // Returns the CPU model name of the system. ...
8 years, 3 months ago (2012-09-06 14:55:15 UTC) #21
Mark Mentovai
LGTM
8 years, 3 months ago (2012-09-06 15:38:35 UTC) #22
Hongbo Min
On 2012/09/06 15:38:35, Mark Mentovai wrote: > LGTM Do you know why can not I ...
8 years, 3 months ago (2012-09-07 06:48:56 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hongbo.min@intel.com/10914060/7054
8 years, 3 months ago (2012-09-07 12:38:52 UTC) #24
commit-bot: I haz the power
Try job failure for 10914060-7054 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 3 months ago (2012-09-07 12:56:13 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hongbo.min@intel.com/10914060/3059
8 years, 3 months ago (2012-09-07 16:00:40 UTC) #26
commit-bot: I haz the power
Try job failure for 10914060-3059 (retry) on mac_rel for step "browser_tests". It's a second try, ...
8 years, 3 months ago (2012-09-07 17:20:56 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hongbo.min@intel.com/10914060/14060
8 years, 3 months ago (2012-09-08 02:11:12 UTC) #28
commit-bot: I haz the power
Change committed as 155575
8 years, 3 months ago (2012-09-08 09:53:03 UTC) #29
Lei Zhang
Post review comment: have you considered using base/cpu.h instead of adding the win/mac/linux specific code?
8 years, 3 months ago (2012-09-13 02:25:21 UTC) #30
Hongbo Min
On 2012/09/13 02:25:21, Lei Zhang wrote: > Post review comment: have you considered using base/cpu.h ...
8 years, 3 months ago (2012-09-13 04:27:20 UTC) #31
Lei Zhang
On 2012/09/13 04:27:20, Hongbo Min wrote: > On 2012/09/13 02:25:21, Lei Zhang wrote: > > ...
8 years, 3 months ago (2012-09-13 04:33:46 UTC) #32
Hongbo Min
On 2012/09/13 04:33:46, Lei Zhang wrote: > On 2012/09/13 04:27:20, Hongbo Min wrote: > > ...
8 years, 3 months ago (2012-09-13 04:36:23 UTC) #33
Lei Zhang
On 2012/09/13 04:36:23, Hongbo Min wrote: > On 2012/09/13 04:33:46, Lei Zhang wrote: > > ...
8 years, 3 months ago (2012-09-13 04:42:28 UTC) #34
Hongbo Min
Agree. btw, could you point me where is using the cpu.h in trunk code?
8 years, 3 months ago (2012-09-13 04:45:57 UTC) #35
Lei Zhang
On 2012/09/13 04:45:57, Hongbo Min wrote: > Agree. > > btw, could you point me ...
8 years, 3 months ago (2012-09-13 04:53:27 UTC) #36
Hongbo Min
8 years, 3 months ago (2012-09-13 04:59:36 UTC) #37
On 2012/09/13 04:53:27, Lei Zhang wrote:
> On 2012/09/13 04:45:57, Hongbo Min wrote:
> > Agree.
> > 
> > btw, could you point me where is using the cpu.h in trunk code?
> 
> Search on http://cs.chromium.org for: base::cpu

fired http://crbug.com/148884 for tracking it.

Powered by Google App Engine
This is Rietveld 408576698