summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/sys_info.h5
-rw-r--r--base/sys_info_posix.cc11
-rw-r--r--base/sys_info_unittest.cc5
-rw-r--r--base/sys_info_win.cc11
4 files changed, 0 insertions, 32 deletions
diff --git a/base/sys_info.h b/base/sys_info.h
index cefce13..1bb4eca 100644
--- a/base/sys_info.h
+++ b/base/sys_info.h
@@ -30,11 +30,6 @@ class SysInfo {
// or -1 on failure.
static int64 AmountOfFreeDiskSpace(const FilePath& path);
- // Return the value of the given environment variable
- // or an empty string if not defined.
- // DEPRECATED in favor of EnvVarGetter in base/env_var.h.
- static std::wstring GetEnvVar(const wchar_t* var);
-
// Returns the name of the host operating system.
static std::string OperatingSystemName();
diff --git a/base/sys_info_posix.cc b/base/sys_info_posix.cc
index f2d75d2..3f487e5 100644
--- a/base/sys_info_posix.cc
+++ b/base/sys_info_posix.cc
@@ -47,17 +47,6 @@ int64 SysInfo::AmountOfFreeDiskSpace(const FilePath& path) {
}
// static
-std::wstring SysInfo::GetEnvVar(const wchar_t* var) {
- std::string var_utf8 = WideToUTF8(std::wstring(var));
- char* value = getenv(var_utf8.c_str());
- if (!value) {
- return std::wstring();
- } else {
- return UTF8ToWide(value);
- }
-}
-
-// static
std::string SysInfo::OperatingSystemName() {
utsname info;
if (uname(&info) < 0) {
diff --git a/base/sys_info_unittest.cc b/base/sys_info_unittest.cc
index 79f172d..3e51890 100644
--- a/base/sys_info_unittest.cc
+++ b/base/sys_info_unittest.cc
@@ -28,11 +28,6 @@ TEST_F(SysInfoTest, AmountOfFreeDiskSpace) {
<< tmp_path.value();
}
-TEST_F(SysInfoTest, GetEnvVar) {
- // Every setup should have non-empty PATH...
- EXPECT_NE(base::SysInfo::GetEnvVar(L"PATH"), L"");
-}
-
#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
TEST_F(SysInfoTest, OperatingSystemVersionNumbers) {
int32 os_major_version = -1;
diff --git a/base/sys_info_win.cc b/base/sys_info_win.cc
index 35a7878..ed4d2fb 100644
--- a/base/sys_info_win.cc
+++ b/base/sys_info_win.cc
@@ -48,17 +48,6 @@ int64 SysInfo::AmountOfFreeDiskSpace(const FilePath& path) {
}
// static
-std::wstring SysInfo::GetEnvVar(const wchar_t* var) {
- DWORD value_length = GetEnvironmentVariable(var, NULL, 0);
- if (value_length == 0) {
- return L"";
- }
- scoped_array<wchar_t> value(new wchar_t[value_length]);
- GetEnvironmentVariable(var, value.get(), value_length);
- return std::wstring(value.get());
-}
-
-// static
std::string SysInfo::OperatingSystemName() {
return "Windows NT";
}