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

Side by Side Diff: base/sys_info.h

Issue 2876045: base: Get rid of the deprecated SysInfo::GetEnvVar. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: " Created 10 years, 5 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
« no previous file with comments | « no previous file | base/sys_info_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 #include <string> 10 #include <string>
(...skipping 12 matching lines...) Expand all
23 23
24 // Return the number of megabytes of physical memory on the current machine. 24 // Return the number of megabytes of physical memory on the current machine.
25 static int AmountOfPhysicalMemoryMB() { 25 static int AmountOfPhysicalMemoryMB() {
26 return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024); 26 return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024);
27 } 27 }
28 28
29 // Return the available disk space in bytes on the volume containing |path|, 29 // Return the available disk space in bytes on the volume containing |path|,
30 // or -1 on failure. 30 // or -1 on failure.
31 static int64 AmountOfFreeDiskSpace(const FilePath& path); 31 static int64 AmountOfFreeDiskSpace(const FilePath& path);
32 32
33 // Return the value of the given environment variable
34 // or an empty string if not defined.
35 // DEPRECATED in favor of EnvVarGetter in base/env_var.h.
36 static std::wstring GetEnvVar(const wchar_t* var);
37
38 // Returns the name of the host operating system. 33 // Returns the name of the host operating system.
39 static std::string OperatingSystemName(); 34 static std::string OperatingSystemName();
40 35
41 // Returns the version of the host operating system. 36 // Returns the version of the host operating system.
42 static std::string OperatingSystemVersion(); 37 static std::string OperatingSystemVersion();
43 38
44 // Retrieves detailed numeric values for the OS version. 39 // Retrieves detailed numeric values for the OS version.
45 // TODO(port): Implement a Linux version of this method and enable the 40 // TODO(port): Implement a Linux version of this method and enable the
46 // corresponding unit test. 41 // corresponding unit test.
47 static void OperatingSystemVersionNumbers(int32 *major_version, 42 static void OperatingSystemVersionNumbers(int32 *major_version,
(...skipping 30 matching lines...) Expand all
78 static void ParseLsbRelease(const std::string& lsb_release, 73 static void ParseLsbRelease(const std::string& lsb_release,
79 int32 *major_version, 74 int32 *major_version,
80 int32 *minor_version, 75 int32 *minor_version,
81 int32 *bugfix_version); 76 int32 *bugfix_version);
82 #endif 77 #endif
83 }; 78 };
84 79
85 } // namespace base 80 } // namespace base
86 81
87 #endif // BASE_SYS_INFO_H_ 82 #endif // BASE_SYS_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | base/sys_info_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698