OLD | NEW |
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 version += StringPrintf(".%d", service_pack.minor); | 67 version += StringPrintf(".%d", service_pack.minor); |
68 } | 68 } |
69 return version; | 69 return version; |
70 } | 70 } |
71 | 71 |
72 // TODO: Implement OperatingSystemVersionComplete, which would include | 72 // TODO: Implement OperatingSystemVersionComplete, which would include |
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::OperatingSystemArchitecture() { |
78 win::OSInfo::WindowsArchitecture arch = | 78 win::OSInfo::WindowsArchitecture arch = |
79 win::OSInfo::GetInstance()->architecture(); | 79 win::OSInfo::GetInstance()->architecture(); |
80 switch (arch) { | 80 switch (arch) { |
81 case win::OSInfo::X86_ARCHITECTURE: | 81 case win::OSInfo::X86_ARCHITECTURE: |
82 return "x86"; | 82 return "x86"; |
83 case win::OSInfo::X64_ARCHITECTURE: | 83 case win::OSInfo::X64_ARCHITECTURE: |
84 return "x86_64"; | 84 return "x86_64"; |
85 case win::OSInfo::IA64_ARCHITECTURE: | 85 case win::OSInfo::IA64_ARCHITECTURE: |
86 return "ia64"; | 86 return "ia64"; |
87 default: | 87 default: |
(...skipping 15 matching lines...) Expand all Loading... |
103 void SysInfo::OperatingSystemVersionNumbers(int32* major_version, | 103 void SysInfo::OperatingSystemVersionNumbers(int32* major_version, |
104 int32* minor_version, | 104 int32* minor_version, |
105 int32* bugfix_version) { | 105 int32* bugfix_version) { |
106 win::OSInfo* os_info = win::OSInfo::GetInstance(); | 106 win::OSInfo* os_info = win::OSInfo::GetInstance(); |
107 *major_version = os_info->version_number().major; | 107 *major_version = os_info->version_number().major; |
108 *minor_version = os_info->version_number().minor; | 108 *minor_version = os_info->version_number().minor; |
109 *bugfix_version = 0; | 109 *bugfix_version = 0; |
110 } | 110 } |
111 | 111 |
112 } // namespace base | 112 } // namespace base |
OLD | NEW |