| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| 11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 std::string SysInfo::OperatingSystemVersion() { | 56 std::string SysInfo::OperatingSystemVersion() { |
| 57 OSVERSIONINFO info = {0}; | 57 OSVERSIONINFO info = {0}; |
| 58 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); | 58 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); |
| 59 GetVersionEx(&info); | 59 GetVersionEx(&info); |
| 60 | 60 |
| 61 return base::StringPrintf("%lu.%lu", | 61 return base::StringPrintf("%lu.%lu", |
| 62 info.dwMajorVersion, info.dwMinorVersion); | 62 info.dwMajorVersion, info.dwMinorVersion); |
| 63 } | 63 } |
| 64 | 64 |
| 65 // TODO: Implement OperatingSystemVersionComplete, which would include | 65 // TODO: Implement OperatingSystemVersionComplete, which would include |
| 66 // patchlevel/service pack number. See chrome/browser/views/bug_report_view.cc, | 66 // patchlevel/service pack number. |
| 67 // BugReportView::SetOSVersion. | 67 // See chrome/browser/ui/views/bug_report_view.cc, BugReportView::SetOSVersion. |
| 68 | 68 |
| 69 // static | 69 // static |
| 70 std::string SysInfo::CPUArchitecture() { | 70 std::string SysInfo::CPUArchitecture() { |
| 71 // TODO: Make this vary when we support any other architectures. | 71 // TODO: Make this vary when we support any other architectures. |
| 72 return "x86"; | 72 return "x86"; |
| 73 } | 73 } |
| 74 | 74 |
| 75 // static | 75 // static |
| 76 void SysInfo::GetPrimaryDisplayDimensions(int* width, int* height) { | 76 void SysInfo::GetPrimaryDisplayDimensions(int* width, int* height) { |
| 77 if (width) | 77 if (width) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 100 int32 *bugfix_version) { | 100 int32 *bugfix_version) { |
| 101 OSVERSIONINFO info = {0}; | 101 OSVERSIONINFO info = {0}; |
| 102 info.dwOSVersionInfoSize = sizeof(info); | 102 info.dwOSVersionInfoSize = sizeof(info); |
| 103 GetVersionEx(&info); | 103 GetVersionEx(&info); |
| 104 *major_version = info.dwMajorVersion; | 104 *major_version = info.dwMajorVersion; |
| 105 *minor_version = info.dwMinorVersion; | 105 *minor_version = info.dwMinorVersion; |
| 106 *bugfix_version = 0; | 106 *bugfix_version = 0; |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace base | 109 } // namespace base |
| OLD | NEW |