summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-07 02:57:59 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-07 02:57:59 +0000
commit3ba7e0887015ba6a59579c4de08a6d609f851c23 (patch)
treed4b3ab95c9fa344346e2a1d3357916771587dcd1 /net
parent3eac24a2b4c9438196899e62ac2f3ae5f03ba039 (diff)
downloadchromium_src-3ba7e0887015ba6a59579c4de08a6d609f851c23.zip
chromium_src-3ba7e0887015ba6a59579c4de08a6d609f851c23.tar.gz
chromium_src-3ba7e0887015ba6a59579c4de08a6d609f851c23.tar.bz2
base: rename Environment::GetEnv to Environment::GetVar.
This is the part 4 and the latest of this series. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3029062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55326 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/proxy/proxy_config_service_linux.cc16
-rw-r--r--net/proxy/proxy_config_service_linux_unittest.cc2
2 files changed, 9 insertions, 9 deletions
diff --git a/net/proxy/proxy_config_service_linux.cc b/net/proxy/proxy_config_service_linux.cc
index b001c11..a3b01b7 100644
--- a/net/proxy/proxy_config_service_linux.cc
+++ b/net/proxy/proxy_config_service_linux.cc
@@ -83,7 +83,7 @@ bool ProxyConfigServiceLinux::Delegate::GetProxyFromEnvVarForScheme(
const char* variable, ProxyServer::Scheme scheme,
ProxyServer* result_server) {
std::string env_value;
- if (env_var_getter_->GetEnv(variable, &env_value)) {
+ if (env_var_getter_->GetVar(variable, &env_value)) {
if (!env_value.empty()) {
env_value = FixupProxyHostScheme(scheme, env_value);
ProxyServer proxy_server =
@@ -111,7 +111,7 @@ bool ProxyConfigServiceLinux::Delegate::GetConfigFromEnv(ProxyConfig* config) {
// extension has ever used this, but it still sounds like a good
// idea.
std::string auto_proxy;
- if (env_var_getter_->GetEnv("auto_proxy", &auto_proxy)) {
+ if (env_var_getter_->GetVar("auto_proxy", &auto_proxy)) {
if (auto_proxy.empty()) {
// Defined and empty => autodetect
config->set_auto_detect(true);
@@ -151,7 +151,7 @@ bool ProxyConfigServiceLinux::Delegate::GetConfigFromEnv(ProxyConfig* config) {
// If the above were not defined, try for socks.
ProxyServer::Scheme scheme = ProxyServer::SCHEME_SOCKS4;
std::string env_version;
- if (env_var_getter_->GetEnv("SOCKS_VERSION", &env_version)
+ if (env_var_getter_->GetVar("SOCKS_VERSION", &env_version)
&& env_version == "5")
scheme = ProxyServer::SCHEME_SOCKS5;
if (GetProxyFromEnvVarForScheme("SOCKS_SERVER", scheme, &proxy_server)) {
@@ -161,7 +161,7 @@ bool ProxyConfigServiceLinux::Delegate::GetConfigFromEnv(ProxyConfig* config) {
}
// Look for the proxy bypass list.
std::string no_proxy;
- env_var_getter_->GetEnv("no_proxy", &no_proxy);
+ env_var_getter_->GetVar("no_proxy", &no_proxy);
if (config->proxy_rules().empty()) {
// Having only "no_proxy" set, presumably to "*", makes it
// explicit that env vars do specify a configuration: having no
@@ -428,13 +428,13 @@ class GConfSettingGetterImplKDE
env_var_getter_(env_var_getter), file_loop_(NULL) {
// Derive the location of the kde config dir from the environment.
std::string home;
- if (env_var_getter->GetEnv("KDEHOME", &home) && !home.empty()) {
+ if (env_var_getter->GetVar("KDEHOME", &home) && !home.empty()) {
// $KDEHOME is set. Use it unconditionally.
kde_config_dir_ = KDEHomeToConfigPath(FilePath(home));
} else {
// $KDEHOME is unset. Try to figure out what to use. This seems to be
// the common case on most distributions.
- if (!env_var_getter->GetEnv(base::env_vars::kHome, &home))
+ if (!env_var_getter->GetVar(base::env_vars::kHome, &home))
// User has no $HOME? Give up. Later we'll report the failure.
return;
if (base::GetDesktopEnvironment(env_var_getter) ==
@@ -688,7 +688,7 @@ class GConfSettingGetterImplKDE
string_map_type::iterator it = string_table_.find(key);
if (it != string_table_.end()) {
std::string value;
- if (env_var_getter_->GetEnv(it->second.c_str(), &value))
+ if (env_var_getter_->GetVar(it->second.c_str(), &value))
it->second = value;
else
string_table_.erase(it);
@@ -700,7 +700,7 @@ class GConfSettingGetterImplKDE
if (it != strings_table_.end()) {
std::string value;
if (!it->second.empty() &&
- env_var_getter_->GetEnv(it->second[0].c_str(), &value))
+ env_var_getter_->GetVar(it->second[0].c_str(), &value))
AddHostList(key, value);
else
strings_table_.erase(it);
diff --git a/net/proxy/proxy_config_service_linux_unittest.cc b/net/proxy/proxy_config_service_linux_unittest.cc
index 74eddc8..0a541c1 100644
--- a/net/proxy/proxy_config_service_linux_unittest.cc
+++ b/net/proxy/proxy_config_service_linux_unittest.cc
@@ -105,7 +105,7 @@ class MockEnvironment : public base::Environment {
}
// Begin base::Environment implementation.
- virtual bool GetEnv(const char* variable_name, std::string* result) {
+ virtual bool GetVar(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.