diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-07 02:57:59 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-07 02:57:59 +0000 |
commit | 3ba7e0887015ba6a59579c4de08a6d609f851c23 (patch) | |
tree | d4b3ab95c9fa344346e2a1d3357916771587dcd1 /chrome | |
parent | 3eac24a2b4c9438196899e62ac2f3ae5f03ba039 (diff) | |
download | chromium_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 'chrome')
-rw-r--r-- | chrome/browser/browser_init.cc | 2 | ||||
-rw-r--r-- | chrome/browser/shell_integration_linux.cc | 6 | ||||
-rw-r--r-- | chrome/browser/shell_integration_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/zygote_host_linux.cc | 2 | ||||
-rw-r--r-- | chrome/common/logging_chrome.cc | 2 | ||||
-rw-r--r-- | chrome/common/logging_chrome_uitest.cc | 2 | ||||
-rw-r--r-- | chrome/plugin/plugin_main_mac.mm | 2 | ||||
-rw-r--r-- | chrome/test/startup/shutdown_test.cc | 2 | ||||
-rw-r--r-- | chrome/test/startup/startup_test.cc | 2 |
9 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index dd79815..ca72ccf 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -316,7 +316,7 @@ LaunchMode GetLaunchShortcutKind() { return LM_SHORTCUT_QUICKLAUNCH; scoped_ptr<base::Environment> env(base::Environment::Create()); std::string appdata_path; - env->GetEnv("USERPROFILE", &appdata_path); + env->GetVar("USERPROFILE", &appdata_path); if (!appdata_path.empty() && shortcut.find(ASCIIToWide(appdata_path)) != std::wstring::npos) return LM_SHORTCUT_DESKTOP; diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc index 27b5a9b..7c0d4cc 100644 --- a/chrome/browser/shell_integration_linux.cc +++ b/chrome/browser/shell_integration_linux.cc @@ -49,7 +49,7 @@ std::string GetDesktopName(base::Environment* env) { // versions can set themselves as the default without interfering with // non-official, packaged versions using the built-in value. std::string name; - if (env->GetEnv("CHROME_DESKTOP", &name) && !name.empty()) + if (env->GetVar("CHROME_DESKTOP", &name) && !name.empty()) return name; return "chromium-browser.desktop"; #endif @@ -254,13 +254,13 @@ bool ShellIntegration::GetDesktopShortcutTemplate( std::vector<FilePath> search_paths; std::string xdg_data_home; - if (env->GetEnv("XDG_DATA_HOME", &xdg_data_home) && + if (env->GetVar("XDG_DATA_HOME", &xdg_data_home) && !xdg_data_home.empty()) { search_paths.push_back(FilePath(xdg_data_home)); } std::string xdg_data_dirs; - if (env->GetEnv("XDG_DATA_DIRS", &xdg_data_dirs) && + if (env->GetVar("XDG_DATA_DIRS", &xdg_data_dirs) && !xdg_data_dirs.empty()) { StringTokenizer tokenizer(xdg_data_dirs, ":"); while (tokenizer.GetNext()) { diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc index 28f02c6..9ea7021 100644 --- a/chrome/browser/shell_integration_unittest.cc +++ b/chrome/browser/shell_integration_unittest.cc @@ -39,7 +39,7 @@ class MockEnvironment : public base::Environment { variables_[name] = value; } - virtual bool GetEnv(const char* variable_name, std::string* result) { + virtual bool GetVar(const char* variable_name, std::string* result) { if (ContainsKey(variables_, variable_name)) { *result = variables_[variable_name]; return true; diff --git a/chrome/browser/zygote_host_linux.cc b/chrome/browser/zygote_host_linux.cc index 0d57b55..f01bcf1 100644 --- a/chrome/browser/zygote_host_linux.cc +++ b/chrome/browser/zygote_host_linux.cc @@ -43,7 +43,7 @@ static void SaveSUIDUnsafeEnvironmentVariables() { scoped_ptr<base::Environment> env(base::Environment::Create()); std::string value; - if (env->GetEnv(envvar, &value)) + if (env->GetVar(envvar, &value)) env->SetVar(saved_envvar, value); else env->UnSetVar(saved_envvar); diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc index 10795caf..f546e35 100644 --- a/chrome/common/logging_chrome.cc +++ b/chrome/common/logging_chrome.cc @@ -249,7 +249,7 @@ void CleanupChromeLogging() { FilePath GetLogFileName() { std::string filename; scoped_ptr<base::Environment> env(base::Environment::Create()); - if (env->GetEnv(env_vars::kLogFileName, &filename) && !filename.empty()) { + if (env->GetVar(env_vars::kLogFileName, &filename) && !filename.empty()) { #if defined(OS_WIN) return FilePath(UTF8ToWide(filename).c_str()); #elif defined(OS_POSIX) diff --git a/chrome/common/logging_chrome_uitest.cc b/chrome/common/logging_chrome_uitest.cc index a8c39c0..328a5a49 100644 --- a/chrome/common/logging_chrome_uitest.cc +++ b/chrome/common/logging_chrome_uitest.cc @@ -26,7 +26,7 @@ class ChromeLoggingTest : public testing::Test { // variable and sets the variable to new_value. void SaveEnvironmentVariable(std::string new_value) { scoped_ptr<base::Environment> env(base::Environment::Create()); - if (!env->GetEnv(env_vars::kLogFileName, &environment_filename_)) + if (!env->GetVar(env_vars::kLogFileName, &environment_filename_)) environment_filename_ = ""; env->SetVar(env_vars::kLogFileName, new_value); diff --git a/chrome/plugin/plugin_main_mac.mm b/chrome/plugin/plugin_main_mac.mm index 47957ba..2bde557 100644 --- a/chrome/plugin/plugin_main_mac.mm +++ b/chrome/plugin/plugin_main_mac.mm @@ -14,7 +14,7 @@ void TrimInterposeEnvironment() { scoped_ptr<base::Environment> env(base::Environment::Create()); std::string interpose_list; - if (!env->GetEnv(plugin_interpose_strings::kDYLDInsertLibrariesKey, + if (!env->GetVar(plugin_interpose_strings::kDYLDInsertLibrariesKey, &interpose_list)) { NOTREACHED() << "No interposing libraries set"; return; diff --git a/chrome/test/startup/shutdown_test.cc b/chrome/test/startup/shutdown_test.cc index db4422e..a7a0722 100644 --- a/chrome/test/startup/shutdown_test.cc +++ b/chrome/test/startup/shutdown_test.cc @@ -72,7 +72,7 @@ class ShutdownTest : public UITest { int numCycles = kNumCyclesMax; scoped_ptr<base::Environment> env(base::Environment::Create()); std::string numCyclesEnv; - if (env->GetEnv(env_vars::kStartupTestsNumCycles, &numCyclesEnv) && + if (env->GetVar(env_vars::kStartupTestsNumCycles, &numCyclesEnv) && base::StringToInt(numCyclesEnv, &numCycles)) { if (numCycles <= kNumCyclesMax) { LOG(INFO) << env_vars::kStartupTestsNumCycles diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc index f6b0479..e33e113 100644 --- a/chrome/test/startup/startup_test.cc +++ b/chrome/test/startup/startup_test.cc @@ -109,7 +109,7 @@ class StartupTest : public UITest { int numCycles = kNumCyclesMax; scoped_ptr<base::Environment> env(base::Environment::Create()); std::string numCyclesEnv; - if (env->GetEnv(env_vars::kStartupTestsNumCycles, &numCyclesEnv) && + if (env->GetVar(env_vars::kStartupTestsNumCycles, &numCyclesEnv) && base::StringToInt(numCyclesEnv, &numCycles)) { if (numCycles <= kNumCyclesMax) { LOG(INFO) << env_vars::kStartupTestsNumCycles |