diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/sys_info.h | 4 | ||||
-rw-r--r-- | base/sys_info_posix.cc | 8 | ||||
-rw-r--r-- | base/sys_info_unittest.cc | 7 | ||||
-rw-r--r-- | base/sys_info_win.cc | 7 |
4 files changed, 3 insertions, 23 deletions
diff --git a/base/sys_info.h b/base/sys_info.h index 0f27aa7..cefce13 100644 --- a/base/sys_info.h +++ b/base/sys_info.h @@ -30,10 +30,6 @@ class SysInfo { // or -1 on failure. static int64 AmountOfFreeDiskSpace(const FilePath& path); - // Return true if the given environment variable is defined. - // DEPRECATED in favor of EnvVarGetter in base/env_var.h. - static bool HasEnvVar(const wchar_t* var); - // 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. diff --git a/base/sys_info_posix.cc b/base/sys_info_posix.cc index b2526ba..f2d75d2 100644 --- a/base/sys_info_posix.cc +++ b/base/sys_info_posix.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -47,12 +47,6 @@ int64 SysInfo::AmountOfFreeDiskSpace(const FilePath& path) { } // static -bool SysInfo::HasEnvVar(const wchar_t* var) { - std::string var_utf8 = WideToUTF8(std::wstring(var)); - return getenv(var_utf8.c_str()) != NULL; -} - -// static std::wstring SysInfo::GetEnvVar(const wchar_t* var) { std::string var_utf8 = WideToUTF8(std::wstring(var)); char* value = getenv(var_utf8.c_str()); diff --git a/base/sys_info_unittest.cc b/base/sys_info_unittest.cc index 4339b6a..79f172d 100644 --- a/base/sys_info_unittest.cc +++ b/base/sys_info_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -33,11 +33,6 @@ TEST_F(SysInfoTest, GetEnvVar) { EXPECT_NE(base::SysInfo::GetEnvVar(L"PATH"), L""); } -TEST_F(SysInfoTest, HasEnvVar) { - // Every setup should have PATH... - EXPECT_TRUE(base::SysInfo::HasEnvVar(L"PATH")); -} - #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 ebb95c7ba..35a7878 100644 --- a/base/sys_info_win.cc +++ b/base/sys_info_win.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -48,11 +48,6 @@ int64 SysInfo::AmountOfFreeDiskSpace(const FilePath& path) { } // static -bool SysInfo::HasEnvVar(const wchar_t* var) { - return GetEnvironmentVariable(var, NULL, 0) != 0; -} - -// static std::wstring SysInfo::GetEnvVar(const wchar_t* var) { DWORD value_length = GetEnvironmentVariable(var, NULL, 0); if (value_length == 0) { |