summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-03 03:00:50 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-03 03:00:50 +0000
commit76b90d310def447b7b5f10d92a69813308150778 (patch)
tree24c61fdccf94360913bfa8f7ac67c24a27bcfb38 /chrome/common
parent7f2a9dbe56bfa6189271af808c53ccaee193a961 (diff)
downloadchromium_src-76b90d310def447b7b5f10d92a69813308150778.zip
chromium_src-76b90d310def447b7b5f10d92a69813308150778.tar.gz
chromium_src-76b90d310def447b7b5f10d92a69813308150778.tar.bz2
base: Rename EnvVarGetter to Environment.
Now EnvVarGetter do much more than getting environment variables. Per suggestion from Pawel in http://codereview.chromium.org/3043018/. BUG=None TEST=trybots Signed-off-by: Thiago Farina <tfarina@chromium.org> Review URL: http://codereview.chromium.org/3052034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54696 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/chrome_paths_linux.cc12
-rw-r--r--chrome/common/logging_chrome.cc6
-rw-r--r--chrome/common/logging_chrome_uitest.cc6
-rw-r--r--chrome/common/process_watcher_win.cc4
4 files changed, 14 insertions, 14 deletions
diff --git a/chrome/common/chrome_paths_linux.cc b/chrome/common/chrome_paths_linux.cc
index 32a9925..f0ff3fb 100644
--- a/chrome/common/chrome_paths_linux.cc
+++ b/chrome/common/chrome_paths_linux.cc
@@ -4,7 +4,7 @@
#include "chrome/common/chrome_paths_internal.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/file_util.h"
#include "base/scoped_ptr.h"
#include "base/xdg_util.h"
@@ -17,7 +17,7 @@ namespace chrome {
// ~/.config/google-chrome/ for official builds.
// (This also helps us sidestep issues with other apps grabbing ~/.chromium .)
bool GetDefaultUserDataDirectory(FilePath* result) {
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
FilePath config_dir(
base::GetXDGDirectory(env.get(), "XDG_CONFIG_HOME", ".config"));
#if defined(GOOGLE_CHROME_BUILD)
@@ -29,7 +29,7 @@ bool GetDefaultUserDataDirectory(FilePath* result) {
}
bool GetChromeFrameUserDataDirectory(FilePath* result) {
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
FilePath config_dir(
base::GetXDGDirectory(env.get(), "XDG_CONFIG_HOME", ".config"));
#if defined(GOOGLE_CHROME_BUILD)
@@ -41,7 +41,7 @@ bool GetChromeFrameUserDataDirectory(FilePath* result) {
}
bool GetUserDocumentsDirectory(FilePath* result) {
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
*result = base::GetXDGUserDirectory(env.get(), "DOCUMENTS", "Documents");
return true;
}
@@ -49,7 +49,7 @@ bool GetUserDocumentsDirectory(FilePath* result) {
// We respect the user's preferred download location, unless it is
// ~ or their desktop directory, in which case we default to ~/Downloads.
bool GetUserDownloadsDirectory(FilePath* result) {
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
*result = base::GetXDGUserDirectory(env.get(), "DOWNLOAD", "Downloads");
FilePath home = file_util::GetHomeDir();
@@ -68,7 +68,7 @@ bool GetUserDownloadsDirectory(FilePath* result) {
}
bool GetUserDesktop(FilePath* result) {
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
*result = base::GetXDGUserDirectory(env.get(), "DESKTOP", "Desktop");
return true;
}
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index b93ca60..301ec13 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -33,7 +33,7 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/debug_util.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
@@ -197,7 +197,7 @@ void InitChromeLogging(const CommandLine& command_line,
// headless mode to be configured either by the Environment
// Variable or by the Command Line Switch. This is for
// automated test purposes.
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
if (env->HasEnv(env_vars::kHeadless) ||
command_line.HasSwitch(switches::kNoErrorDialogs))
SuppressDialogs();
@@ -240,7 +240,7 @@ void CleanupChromeLogging() {
FilePath GetLogFileName() {
std::string filename;
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
if (env->GetEnv(env_vars::kLogFileName, &filename) && !filename.empty()) {
#if defined(OS_WIN)
return FilePath(UTF8ToWide(filename).c_str());
diff --git a/chrome/common/logging_chrome_uitest.cc b/chrome/common/logging_chrome_uitest.cc
index f92525e..2a2e89b 100644
--- a/chrome/common/logging_chrome_uitest.cc
+++ b/chrome/common/logging_chrome_uitest.cc
@@ -12,7 +12,7 @@
#include "base/basictypes.h"
#include "base/command_line.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/env_vars.h"
#include "chrome/common/logging_chrome.h"
@@ -25,7 +25,7 @@ class ChromeLoggingTest : public testing::Test {
// Stores the current value of the log file name environment
// variable and sets the variable to new_value.
void SaveEnvironmentVariable(std::string new_value) {
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
if (!env->GetEnv(env_vars::kLogFileName, &environment_filename_))
environment_filename_ = "";
@@ -35,7 +35,7 @@ class ChromeLoggingTest : public testing::Test {
// Restores the value of the log file nave environment variable
// previously saved by SaveEnvironmentVariable().
void RestoreEnvironmentVariable() {
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
env->SetEnv(env_vars::kLogFileName, environment_filename_);
}
diff --git a/chrome/common/process_watcher_win.cc b/chrome/common/process_watcher_win.cc
index ed99780..8f37d3f 100644
--- a/chrome/common/process_watcher_win.cc
+++ b/chrome/common/process_watcher_win.cc
@@ -5,7 +5,7 @@
#include "chrome/common/process_watcher.h"
#include "base/scoped_ptr.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/message_loop.h"
#include "base/object_watcher.h"
#include "chrome/common/env_vars.h"
@@ -49,7 +49,7 @@ class TimerExpiredTask : public Task, public base::ObjectWatcher::Delegate {
private:
void KillProcess() {
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
if (env->HasEnv(env_vars::kHeadless)) {
// If running the distributed tests, give the renderer a little time
// to figure out that the channel is shutdown and unwind.