summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_config_service_linux_unittest.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-03 01:05:39 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-03 01:05:39 +0000
commit9bc8cff2f20eb98d86cfa77f5e75b5b3efc80ced (patch)
tree969fefb9d6c5d42d974fccd4d640861dc880a73d /net/proxy/proxy_config_service_linux_unittest.cc
parentd5c8101d795d43c265d81277305958d38160ab19 (diff)
downloadchromium_src-9bc8cff2f20eb98d86cfa77f5e75b5b3efc80ced.zip
chromium_src-9bc8cff2f20eb98d86cfa77f5e75b5b3efc80ced.tar.gz
chromium_src-9bc8cff2f20eb98d86cfa77f5e75b5b3efc80ced.tar.bz2
Move EnvironmentVariableGetter from base/linux_util.h to base/env_var.h and rename it EnvVarGetter. Label base::SysInfo::{Get,Has}EnvVar as deprecated.
BUG=none TEST=none Review URL: http://codereview.chromium.org/1606007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_config_service_linux_unittest.cc')
-rw-r--r--net/proxy/proxy_config_service_linux_unittest.cc20
1 files changed, 8 insertions, 12 deletions
diff --git a/net/proxy/proxy_config_service_linux_unittest.cc b/net/proxy/proxy_config_service_linux_unittest.cc
index 689b8b6..e6afb43 100644
--- a/net/proxy/proxy_config_service_linux_unittest.cc
+++ b/net/proxy/proxy_config_service_linux_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 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.
@@ -77,9 +77,9 @@ struct SettingsTable {
map_type settings;
};
-class MockEnvironmentVariableGetter : public base::EnvironmentVariableGetter {
+class MockEnvVarGetter : public base::EnvVarGetter {
public:
- MockEnvironmentVariableGetter() {
+ MockEnvVarGetter() {
#define ENTRY(x) table.settings[#x] = &values.x
ENTRY(DESKTOP_SESSION);
ENTRY(KDE_HOME);
@@ -101,7 +101,7 @@ class MockEnvironmentVariableGetter : public base::EnvironmentVariableGetter {
values = zero_values;
}
- virtual bool Getenv(const char* variable_name, std::string* result) {
+ virtual bool GetEnv(const char* variable_name, std::string* result) {
const char* env_value = table.Get(variable_name);
if (env_value) {
// Note that the variable may be defined but empty.
@@ -576,8 +576,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
SCOPED_TRACE(StringPrintf("Test[%" PRIuS "] %s", i,
tests[i].description.c_str()));
- MockEnvironmentVariableGetter* env_getter =
- new MockEnvironmentVariableGetter;
+ MockEnvVarGetter* env_getter = new MockEnvVarGetter;
MockGConfSettingGetter* gconf_getter = new MockGConfSettingGetter;
SynchConfigGetter sync_config_getter(
new ProxyConfigServiceLinux(env_getter, gconf_getter));
@@ -844,8 +843,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
SCOPED_TRACE(StringPrintf("Test[%" PRIuS "] %s", i,
tests[i].description.c_str()));
- MockEnvironmentVariableGetter* env_getter =
- new MockEnvironmentVariableGetter;
+ MockEnvVarGetter* env_getter = new MockEnvVarGetter;
MockGConfSettingGetter* gconf_getter = new MockGConfSettingGetter;
SynchConfigGetter sync_config_getter(
new ProxyConfigServiceLinux(env_getter, gconf_getter));
@@ -861,8 +859,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) {
}
TEST_F(ProxyConfigServiceLinuxTest, GconfNotification) {
- MockEnvironmentVariableGetter* env_getter =
- new MockEnvironmentVariableGetter;
+ MockEnvVarGetter* env_getter = new MockEnvVarGetter;
MockGConfSettingGetter* gconf_getter = new MockGConfSettingGetter;
ProxyConfigServiceLinux* service =
new ProxyConfigServiceLinux(env_getter, gconf_getter);
@@ -1166,8 +1163,7 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
SCOPED_TRACE(StringPrintf("Test[%" PRIuS "] %s", i,
tests[i].description.c_str()));
- MockEnvironmentVariableGetter* env_getter =
- new MockEnvironmentVariableGetter;
+ MockEnvVarGetter* env_getter = new MockEnvVarGetter;
// Force the KDE getter to be used and tell it where the test is.
env_getter->values.DESKTOP_SESSION = "kde4";
env_getter->values.KDE_HOME = kde_home_.value().c_str();