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

Side by Side Diff: base/sys_info_win.cc

Issue 10914060: Refine systemInfo.cpu API defintions and provide systemInfo.cpu.get impl for Windows and Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add impl for mac and ios Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/sys_info.h" 5 #include "base/sys_info.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // patchlevel/service pack number. 73 // patchlevel/service pack number.
74 // See chrome/browser/feedback/feedback_util.h, FeedbackUtil::SetOSVersion. 74 // See chrome/browser/feedback/feedback_util.h, FeedbackUtil::SetOSVersion.
75 75
76 // static 76 // static
77 std::string SysInfo::CPUArchitecture() { 77 std::string SysInfo::CPUArchitecture() {
78 // TODO: Make this vary when we support any other architectures. 78 // TODO: Make this vary when we support any other architectures.
79 return "x86"; 79 return "x86";
80 } 80 }
81 81
82 // static 82 // static
83 std::string SysInfo::CPUModelName() {
84 return win::OSInfo::GetInstance()->processor_model_name();
85 }
86
87 // static
83 size_t SysInfo::VMAllocationGranularity() { 88 size_t SysInfo::VMAllocationGranularity() {
84 return win::OSInfo::GetInstance()->allocation_granularity(); 89 return win::OSInfo::GetInstance()->allocation_granularity();
85 } 90 }
86 91
87 // static 92 // static
88 void SysInfo::OperatingSystemVersionNumbers(int32* major_version, 93 void SysInfo::OperatingSystemVersionNumbers(int32* major_version,
89 int32* minor_version, 94 int32* minor_version,
90 int32* bugfix_version) { 95 int32* bugfix_version) {
91 win::OSInfo* os_info = win::OSInfo::GetInstance(); 96 win::OSInfo* os_info = win::OSInfo::GetInstance();
92 *major_version = os_info->version_number().major; 97 *major_version = os_info->version_number().major;
93 *minor_version = os_info->version_number().minor; 98 *minor_version = os_info->version_number().minor;
94 *bugfix_version = 0; 99 *bugfix_version = 0;
95 } 100 }
96 101
97 } // namespace base 102 } // namespace base
OLDNEW
« base/sys_info_mac.cc ('K') | « base/sys_info_mac.cc ('k') | base/win/windows_version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698