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

Side by Side Diff: base/sys_info.h

Issue 7144007: Improve and unify Mac OS X run-time version checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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) 2011 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 #ifndef BASE_SYS_INFO_H_ 5 #ifndef BASE_SYS_INFO_H_
6 #define BASE_SYS_INFO_H_ 6 #define BASE_SYS_INFO_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/base_api.h" 9 #include "base/base_api.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 23 matching lines...) Expand all
34 34
35 // Returns the name of the host operating system. 35 // Returns the name of the host operating system.
36 static std::string OperatingSystemName(); 36 static std::string OperatingSystemName();
37 37
38 // Returns the version of the host operating system. 38 // Returns the version of the host operating system.
39 static std::string OperatingSystemVersion(); 39 static std::string OperatingSystemVersion();
40 40
41 // Retrieves detailed numeric values for the OS version. 41 // Retrieves detailed numeric values for the OS version.
42 // TODO(port): Implement a Linux version of this method and enable the 42 // TODO(port): Implement a Linux version of this method and enable the
43 // corresponding unit test. 43 // corresponding unit test.
44 // DON'T USE THIS ON THE MAC OR WINDOWS to determine the current OS release
45 // for OS version-specific feature checks and workarounds. If you must use
46 // an OS version check instead of a feature check, use the base::mac::IsOS*
47 // family from base/mac/mac_util.h, or base::win::GetVersion from
48 // base/win/windows_version.h.
Avi (use Gerrit) 2011/06/14 17:50:17 Is there any use left for this function, then?
Mark Mentovai 2011/06/14 18:00:18 Avi wrote:
44 static void OperatingSystemVersionNumbers(int32* major_version, 49 static void OperatingSystemVersionNumbers(int32* major_version,
45 int32* minor_version, 50 int32* minor_version,
46 int32* bugfix_version); 51 int32* bugfix_version);
47 52
48 // Returns the CPU architecture of the system. Exact return value may differ 53 // Returns the CPU architecture of the system. Exact return value may differ
49 // across platforms. 54 // across platforms.
50 static std::string CPUArchitecture(); 55 static std::string CPUArchitecture();
51 56
52 // Returns the pixel dimensions of the primary display via the 57 // Returns the pixel dimensions of the primary display via the
53 // width and height parameters. 58 // width and height parameters.
(...skipping 21 matching lines...) Expand all
75 static void ParseLsbRelease(const std::string& lsb_release, 80 static void ParseLsbRelease(const std::string& lsb_release,
76 int32* major_version, 81 int32* major_version,
77 int32* minor_version, 82 int32* minor_version,
78 int32* bugfix_version); 83 int32* bugfix_version);
79 #endif 84 #endif
80 }; 85 };
81 86
82 } // namespace base 87 } // namespace base
83 88
84 #endif // BASE_SYS_INFO_H_ 89 #endif // BASE_SYS_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698