summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_init.cc4
-rw-r--r--chrome/browser/dom_ui/advanced_options_utils_gtk.cc8
-rw-r--r--chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc6
-rw-r--r--chrome/browser/gtk/gconf_titlebar_listener.cc6
-rw-r--r--chrome/browser/gtk/gtk_theme_provider.cc6
-rw-r--r--chrome/browser/gtk/options/advanced_contents_gtk.cc8
-rw-r--r--chrome/browser/locale_tests_uitest.cc4
-rw-r--r--chrome/browser/net/url_fixer_upper.cc2
-rw-r--r--chrome/browser/profile.cc1
-rw-r--r--chrome/browser/profile_impl.cc6
-rw-r--r--chrome/browser/renderer_host/audio_renderer_host_unittest.cc4
-rw-r--r--chrome/browser/safe_browsing/protocol_manager.cc4
-rw-r--r--chrome/browser/shell_integration.h4
-rw-r--r--chrome/browser/shell_integration_linux.cc22
-rw-r--r--chrome/browser/shell_integration_unittest.cc26
-rw-r--r--chrome/browser/web_applications/web_app.cc6
-rw-r--r--chrome/browser/zygote_host_linux.cc4
-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
-rw-r--r--chrome/plugin/plugin_main_mac.mm4
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_tests.cc4
-rw-r--r--chrome/test/startup/shutdown_test.cc4
-rw-r--r--chrome/test/startup/startup_test.cc4
-rw-r--r--chrome/test/ui/ui_test_suite.cc4
26 files changed, 84 insertions, 85 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 66c8b35..c5d8355 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -8,7 +8,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/event_recorder.h"
#include "base/histogram.h"
#include "base/path_service.h"
@@ -312,7 +312,7 @@ LaunchMode GetLaunchShortcutKind() {
// The windows quick launch path is not localized.
if (shortcut.find(L"\\Quick Launch\\") != std::wstring::npos)
return LM_SHORTCUT_QUICKLAUNCH;
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
std::string appdata_path;
env->GetEnv("USERPROFILE", &appdata_path);
if (!appdata_path.empty() &&
diff --git a/chrome/browser/dom_ui/advanced_options_utils_gtk.cc b/chrome/browser/dom_ui/advanced_options_utils_gtk.cc
index 6cbf8d6..95c4824 100644
--- a/chrome/browser/dom_ui/advanced_options_utils_gtk.cc
+++ b/chrome/browser/dom_ui/advanced_options_utils_gtk.cc
@@ -9,7 +9,7 @@
#include "app/gtk_signal.h"
#include "app/gtk_util.h"
#include "base/file_util.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/process_util.h"
#include "base/string_tokenizer.h"
#include "base/xdg_util.h"
@@ -81,11 +81,11 @@ static void StartProxyConfigUtil(const ProxyConfigCommand& command) {
void AdvancedOptionsUtilities::ShowNetworkProxySettings(
TabContents* tab_contents) {
- scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
ProxyConfigCommand command;
bool found_command = false;
- switch (base::GetDesktopEnvironment(env_getter.get())) {
+ switch (base::GetDesktopEnvironment(env.get())) {
case base::DESKTOP_ENVIRONMENT_GNOME: {
size_t index;
ProxyConfigCommand commands[2];
@@ -115,7 +115,7 @@ void AdvancedOptionsUtilities::ShowNetworkProxySettings(
if (found_command) {
StartProxyConfigUtil(command);
} else {
- const char* name = base::GetDesktopEnvironmentName(env_getter.get());
+ const char* name = base::GetDesktopEnvironmentName(env.get());
if (name)
LOG(ERROR) << "Could not find " << name << " network settings in $PATH";
tab_contents->OpenURL(GURL(kLinuxProxyConfigUrl), GURL(),
diff --git a/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc b/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc
index 41eebda8..0d41355 100644
--- a/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc
+++ b/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc
@@ -8,7 +8,7 @@
#include "app/gtk_util.h"
#include "app/l10n_util.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/gtk/gtk_util.h"
#include "chrome/browser/shell_integration.h"
@@ -187,10 +187,10 @@ void CreateApplicationShortcutsDialogGtk::CreateDesktopShortcut(
const ShellIntegration::ShortcutInfo& shortcut_info) {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
- scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
std::string shortcut_template;
- if (ShellIntegration::GetDesktopShortcutTemplate(env_getter.get(),
+ if (ShellIntegration::GetDesktopShortcutTemplate(env.get(),
&shortcut_template)) {
ShellIntegration::CreateDesktopShortcut(shortcut_info,
shortcut_template);
diff --git a/chrome/browser/gtk/gconf_titlebar_listener.cc b/chrome/browser/gtk/gconf_titlebar_listener.cc
index 109ed996..b33ab17 100644
--- a/chrome/browser/gtk/gconf_titlebar_listener.cc
+++ b/chrome/browser/gtk/gconf_titlebar_listener.cc
@@ -7,7 +7,7 @@
#include <gtk/gtk.h>
#include "base/scoped_ptr.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/xdg_util.h"
#include "chrome/browser/gtk/browser_titlebar.h"
@@ -45,8 +45,8 @@ void GConfTitlebarListener::RemoveObserver(BrowserTitlebar* titlebar) {
// Private:
GConfTitlebarListener::GConfTitlebarListener() : client_(NULL) {
- scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create());
- if (base::GetDesktopEnvironment(env_getter.get()) ==
+ scoped_ptr<base::Environment> env(base::Environment::Create());
+ if (base::GetDesktopEnvironment(env.get()) ==
base::DESKTOP_ENVIRONMENT_GNOME) {
client_ = gconf_client_get_default();
// If we fail to get a context, that's OK, since we'll just fallback on
diff --git a/chrome/browser/gtk/gtk_theme_provider.cc b/chrome/browser/gtk/gtk_theme_provider.cc
index 9a982d0..577c6d1 100644
--- a/chrome/browser/gtk/gtk_theme_provider.cc
+++ b/chrome/browser/gtk/gtk_theme_provider.cc
@@ -10,7 +10,7 @@
#include "app/gtk_signal_registrar.h"
#include "app/resource_bundle.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/stl_util-inl.h"
#include "base/xdg_util.h"
#include "chrome/browser/metrics/user_metrics.h"
@@ -563,9 +563,9 @@ GdkPixbuf* GtkThemeProvider::GetDefaultFavicon(bool native) {
// static
bool GtkThemeProvider::DefaultUsesSystemTheme() {
- scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
- switch (base::GetDesktopEnvironment(env_getter.get())) {
+ switch (base::GetDesktopEnvironment(env.get())) {
case base::DESKTOP_ENVIRONMENT_GNOME:
case base::DESKTOP_ENVIRONMENT_XFCE:
return true;
diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc
index 1c12391..15650b2 100644
--- a/chrome/browser/gtk/options/advanced_contents_gtk.cc
+++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc
@@ -14,7 +14,7 @@
#include "app/gtk_util.h"
#include "app/l10n_util.h"
#include "base/basictypes.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/process_util.h"
@@ -421,11 +421,11 @@ void NetworkSection::OnChangeProxiesButtonClicked(GtkButton *button,
section->UserMetricsRecordAction(UserMetricsAction("Options_ChangeProxies"),
NULL);
- scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
ProxyConfigCommand command;
bool found_command = false;
- switch (base::GetDesktopEnvironment(env_getter.get())) {
+ switch (base::GetDesktopEnvironment(env.get())) {
case base::DESKTOP_ENVIRONMENT_GNOME: {
size_t index;
ProxyConfigCommand commands[2];
@@ -455,7 +455,7 @@ void NetworkSection::OnChangeProxiesButtonClicked(GtkButton *button,
if (found_command) {
StartProxyConfigUtil(command);
} else {
- const char* name = base::GetDesktopEnvironmentName(env_getter.get());
+ const char* name = base::GetDesktopEnvironmentName(env.get());
if (name)
LOG(ERROR) << "Could not find " << name << " network settings in $PATH";
BrowserList::GetLastActive()->
diff --git a/chrome/browser/locale_tests_uitest.cc b/chrome/browser/locale_tests_uitest.cc
index d5cb994..94cefdb 100644
--- a/chrome/browser/locale_tests_uitest.cc
+++ b/chrome/browser/locale_tests_uitest.cc
@@ -4,7 +4,7 @@
#include "chrome/test/ui/ui_test.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "build/build_config.h"
class LocaleTestsBase : public UITest {
@@ -15,7 +15,7 @@ class LocaleTestsBase : public UITest {
protected:
void RestoreLcAllEnvironment() {
#if defined(OS_LINUX)
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
if (old_lc_all_) {
env->SetEnv("LC_ALL", old_lc_all_);
} else {
diff --git a/chrome/browser/net/url_fixer_upper.cc b/chrome/browser/net/url_fixer_upper.cc
index 92b69db..3aad8f2 100644
--- a/chrome/browser/net/url_fixer_upper.cc
+++ b/chrome/browser/net/url_fixer_upper.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/string_util.h"
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index f2cd905..02ac436 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -6,7 +6,6 @@
#include "app/resource_bundle.h"
#include "base/command_line.h"
-#include "base/env_var.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/path_service.h"
diff --git a/chrome/browser/profile_impl.cc b/chrome/browser/profile_impl.cc
index 6c085f7..7e8f133 100644
--- a/chrome/browser/profile_impl.cc
+++ b/chrome/browser/profile_impl.cc
@@ -6,7 +6,7 @@
#include "app/resource_bundle.h"
#include "base/command_line.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/path_service.h"
@@ -863,8 +863,8 @@ void ProfileImpl::CreatePasswordStore() {
} else if (store_type == L"gnome") {
desktop_env = base::DESKTOP_ENVIRONMENT_GNOME;
} else if (store_type == L"detect") {
- scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create());
- desktop_env = base::GetDesktopEnvironment(env_getter.get());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
+ desktop_env = base::GetDesktopEnvironment(env.get());
LOG(INFO) << "Password storage detected desktop environment: " <<
base::GetDesktopEnvironmentName(desktop_env);
} else {
diff --git a/chrome/browser/renderer_host/audio_renderer_host_unittest.cc b/chrome/browser/renderer_host/audio_renderer_host_unittest.cc
index 0af6cd2..6a428d4 100644
--- a/chrome/browser/renderer_host/audio_renderer_host_unittest.cc
+++ b/chrome/browser/renderer_host/audio_renderer_host_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/message_loop.h"
#include "base/process_util.h"
#include "base/scoped_ptr.h"
@@ -29,7 +29,7 @@ static const int kRouteId = 200;
static const int kStreamId = 50;
static bool IsRunningHeadless() {
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
if (env->HasEnv("CHROME_HEADLESS"))
return true;
return false;
diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc
index 3e9d5db..886c805 100644
--- a/chrome/browser/safe_browsing/protocol_manager.cc
+++ b/chrome/browser/safe_browsing/protocol_manager.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/safe_browsing/protocol_manager.h"
#include "base/base64.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/file_version_info.h"
#include "base/histogram.h"
#include "base/logging.h"
@@ -418,7 +418,7 @@ bool SafeBrowsingProtocolManager::HandleServiceResponse(const GURL& url,
void SafeBrowsingProtocolManager::Initialize() {
// Don't want to hit the safe browsing servers on build/chrome bots.
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
if (env->HasEnv(env_vars::kHeadless))
return;
diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h
index 1080c30..23d0701 100644
--- a/chrome/browser/shell_integration.h
+++ b/chrome/browser/shell_integration.h
@@ -18,7 +18,7 @@ class FilePath;
#if defined(USE_X11)
namespace base {
-class EnvVarGetter;
+class Environment;
}
#endif
@@ -78,7 +78,7 @@ class ShellIntegration {
const string16& extension_app_id);
#if defined(USE_X11)
- static bool GetDesktopShortcutTemplate(base::EnvVarGetter* env_getter,
+ static bool GetDesktopShortcutTemplate(base::Environment* env,
std::string* output);
// Returns filename for .desktop file based on |url|, sanitized for security.
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index 95b3e85..27b5a9b 100644
--- a/chrome/browser/shell_integration_linux.cc
+++ b/chrome/browser/shell_integration_linux.cc
@@ -15,7 +15,7 @@
#include "base/command_line.h"
#include "base/eintr_wrapper.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/i18n/file_util_icu.h"
@@ -41,7 +41,7 @@
namespace {
-std::string GetDesktopName(base::EnvVarGetter* env_getter) {
+std::string GetDesktopName(base::Environment* env) {
#if defined(GOOGLE_CHROME_BUILD)
return "google-chrome.desktop";
#else // CHROMIUM_BUILD
@@ -49,7 +49,7 @@ std::string GetDesktopName(base::EnvVarGetter* env_getter) {
// versions can set themselves as the default without interfering with
// non-official, packaged versions using the built-in value.
std::string name;
- if (env_getter->GetEnv("CHROME_DESKTOP", &name) && !name.empty())
+ if (env->GetEnv("CHROME_DESKTOP", &name) && !name.empty())
return name;
return "chromium-browser.desktop";
#endif
@@ -201,13 +201,13 @@ void CreateShortcutInApplicationsMenu(const FilePath& shortcut_filename,
// static
bool ShellIntegration::SetAsDefaultBrowser() {
- scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
std::vector<std::string> argv;
argv.push_back("xdg-settings");
argv.push_back("set");
argv.push_back("default-web-browser");
- argv.push_back(GetDesktopName(env_getter.get()));
+ argv.push_back(GetDesktopName(env.get()));
return LaunchXdgUtility(argv);
}
@@ -215,13 +215,13 @@ bool ShellIntegration::SetAsDefaultBrowser() {
ShellIntegration::DefaultBrowserState ShellIntegration::IsDefaultBrowser() {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
- scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
std::vector<std::string> argv;
argv.push_back("xdg-settings");
argv.push_back("check");
argv.push_back("default-web-browser");
- argv.push_back(GetDesktopName(env_getter.get()));
+ argv.push_back(GetDesktopName(env.get()));
std::string reply;
if (!base::GetAppOutput(CommandLine(argv), &reply)) {
@@ -248,19 +248,19 @@ bool ShellIntegration::IsFirefoxDefaultBrowser() {
// static
bool ShellIntegration::GetDesktopShortcutTemplate(
- base::EnvVarGetter* env_getter, std::string* output) {
+ base::Environment* env, std::string* output) {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
std::vector<FilePath> search_paths;
std::string xdg_data_home;
- if (env_getter->GetEnv("XDG_DATA_HOME", &xdg_data_home) &&
+ if (env->GetEnv("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_getter->GetEnv("XDG_DATA_DIRS", &xdg_data_dirs) &&
+ if (env->GetEnv("XDG_DATA_DIRS", &xdg_data_dirs) &&
!xdg_data_dirs.empty()) {
StringTokenizer tokenizer(xdg_data_dirs, ":");
while (tokenizer.GetNext()) {
@@ -275,7 +275,7 @@ bool ShellIntegration::GetDesktopShortcutTemplate(
search_paths.push_back(FilePath("/usr/share/applications"));
search_paths.push_back(FilePath("/usr/local/share/applications"));
- std::string template_filename(GetDesktopName(env_getter));
+ std::string template_filename(GetDesktopName(env));
for (std::vector<FilePath>::const_iterator i = search_paths.begin();
i != search_paths.end(); ++i) {
FilePath path = (*i).Append(template_filename);
diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc
index dbaa290..708bf3c 100644
--- a/chrome/browser/shell_integration_unittest.cc
+++ b/chrome/browser/shell_integration_unittest.cc
@@ -21,7 +21,7 @@
#if defined(OS_WIN)
#include "chrome/installer/util/browser_distribution.h"
#elif defined(OS_LINUX)
-#include "base/env_var.h"
+#include "base/environment.h"
#endif // defined(OS_LINUX)
#define FPL FILE_PATH_LITERAL
@@ -30,9 +30,9 @@
namespace {
// Provides mock environment variables values based on a stored map.
-class MockEnvVarGetter : public base::EnvVarGetter {
+class MockEnvironment : public base::Environment {
public:
- MockEnvVarGetter() {}
+ MockEnvironment() {}
void Set(const std::string& name, const std::string& value) {
variables_[name] = value;
@@ -60,7 +60,7 @@ class MockEnvVarGetter : public base::EnvVarGetter {
private:
std::map<std::string, std::string> variables_;
- DISALLOW_COPY_AND_ASSIGN(MockEnvVarGetter);
+ DISALLOW_COPY_AND_ASSIGN(MockEnvironment);
};
} // namespace
@@ -82,13 +82,13 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) {
ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- MockEnvVarGetter env_getter;
- env_getter.Set("XDG_DATA_HOME", temp_dir.path().value());
+ MockEnvironment env;
+ env.Set("XDG_DATA_HOME", temp_dir.path().value());
ASSERT_TRUE(file_util::WriteFile(
temp_dir.path().AppendASCII(kTemplateFilename),
kTestData1, strlen(kTestData1)));
std::string contents;
- ASSERT_TRUE(ShellIntegration::GetDesktopShortcutTemplate(&env_getter,
+ ASSERT_TRUE(ShellIntegration::GetDesktopShortcutTemplate(&env,
&contents));
EXPECT_EQ(kTestData1, contents);
}
@@ -97,8 +97,8 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) {
ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- MockEnvVarGetter env_getter;
- env_getter.Set("XDG_DATA_DIRS", temp_dir.path().value());
+ MockEnvironment env;
+ env.Set("XDG_DATA_DIRS", temp_dir.path().value());
ASSERT_TRUE(file_util::CreateDirectory(
temp_dir.path().AppendASCII("applications")));
ASSERT_TRUE(file_util::WriteFile(
@@ -106,7 +106,7 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) {
.AppendASCII(kTemplateFilename),
kTestData2, strlen(kTestData2)));
std::string contents;
- ASSERT_TRUE(ShellIntegration::GetDesktopShortcutTemplate(&env_getter,
+ ASSERT_TRUE(ShellIntegration::GetDesktopShortcutTemplate(&env,
&contents));
EXPECT_EQ(kTestData2, contents);
}
@@ -115,8 +115,8 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) {
ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- MockEnvVarGetter env_getter;
- env_getter.Set("XDG_DATA_DIRS", temp_dir.path().value() + ":" +
+ MockEnvironment env;
+ env.Set("XDG_DATA_DIRS", temp_dir.path().value() + ":" +
temp_dir.path().AppendASCII("applications").value());
ASSERT_TRUE(file_util::CreateDirectory(
temp_dir.path().AppendASCII("applications")));
@@ -128,7 +128,7 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) {
.AppendASCII(kTemplateFilename),
kTestData2, strlen(kTestData2)));
std::string contents;
- ASSERT_TRUE(ShellIntegration::GetDesktopShortcutTemplate(&env_getter,
+ ASSERT_TRUE(ShellIntegration::GetDesktopShortcutTemplate(&env,
&contents));
EXPECT_EQ(kTestData1, contents);
}
diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc
index df01bd5..dea6f74 100644
--- a/chrome/browser/web_applications/web_app.cc
+++ b/chrome/browser/web_applications/web_app.cc
@@ -33,7 +33,7 @@
#include "webkit/glue/dom_operations.h"
#if defined(OS_LINUX)
-#include "base/env_var.h"
+#include "base/environment.h"
#endif // defined(OS_LINUX)
#if defined(OS_WIN)
@@ -259,10 +259,10 @@ bool CreateShortcutTask::CreateShortcut() {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
#if defined(OS_LINUX)
- scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
std::string shortcut_template;
- if (!ShellIntegration::GetDesktopShortcutTemplate(env_getter.get(),
+ if (!ShellIntegration::GetDesktopShortcutTemplate(env.get(),
&shortcut_template)) {
return false;
}
diff --git a/chrome/browser/zygote_host_linux.cc b/chrome/browser/zygote_host_linux.cc
index 4d9189f..4ede333 100644
--- a/chrome/browser/zygote_host_linux.cc
+++ b/chrome/browser/zygote_host_linux.cc
@@ -11,7 +11,7 @@
#include "base/command_line.h"
#include "base/eintr_wrapper.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/linux_util.h"
#include "base/logging.h"
#include "base/path_service.h"
@@ -40,7 +40,7 @@ static void SaveSUIDUnsafeEnvironmentVariables() {
if (!saved_envvar)
continue;
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
std::string value;
if (env->GetEnv(envvar, &value))
env->SetEnv(saved_envvar, value);
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.
diff --git a/chrome/plugin/plugin_main_mac.mm b/chrome/plugin/plugin_main_mac.mm
index 119f986..7c7c879 100644
--- a/chrome/plugin/plugin_main_mac.mm
+++ b/chrome/plugin/plugin_main_mac.mm
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/chrome_application_mac.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "chrome/common/plugin_carbon_interpose_constants_mac.h"
@@ -11,7 +11,7 @@
#if !defined(__LP64__)
void TrimInterposeEnvironment() {
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
std::string interpose_list;
if (!env->GetEnv(plugin_interpose_strings::kDYLDInsertLibrariesKey,
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc
index e7df26d..77726e0 100644
--- a/chrome/test/automated_ui_tests/automated_ui_tests.cc
+++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc
@@ -7,7 +7,7 @@
#include <vector>
#include "base/command_line.h"
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/file_util.h"
#include "base/keyboard_codes.h"
#include "base/logging.h"
@@ -131,7 +131,7 @@ AutomatedUITest::AutomatedUITest()
base::StringToInt(str, &post_action_delay_);
}
}
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
if (env->HasEnv(env_vars::kHeadless))
logging::SetLogReportHandler(SilentRuntimeReportHandler);
}
diff --git a/chrome/test/startup/shutdown_test.cc b/chrome/test/startup/shutdown_test.cc
index 78f82bd..db4422e 100644
--- a/chrome/test/startup/shutdown_test.cc
+++ b/chrome/test/startup/shutdown_test.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/platform_thread.h"
@@ -70,7 +70,7 @@ class ShutdownTest : public UITest {
UITest::ShutdownType shutdown_type) {
const int kNumCyclesMax = 20;
int numCycles = kNumCyclesMax;
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
std::string numCyclesEnv;
if (env->GetEnv(env_vars::kStartupTestsNumCycles, &numCyclesEnv) &&
base::StringToInt(numCyclesEnv, &numCycles)) {
diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc
index 366be92..8369e8a 100644
--- a/chrome/test/startup/startup_test.cc
+++ b/chrome/test/startup/startup_test.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/platform_thread.h"
@@ -106,7 +106,7 @@ class StartupTest : public UITest {
const int kNumCyclesMax = 20;
int numCycles = kNumCyclesMax;
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
std::string numCyclesEnv;
if (env->GetEnv(env_vars::kStartupTestsNumCycles, &numCyclesEnv) &&
base::StringToInt(numCyclesEnv, &numCycles)) {
diff --git a/chrome/test/ui/ui_test_suite.cc b/chrome/test/ui/ui_test_suite.cc
index dbcc191..b74593d 100644
--- a/chrome/test/ui/ui_test_suite.cc
+++ b/chrome/test/ui/ui_test_suite.cc
@@ -6,7 +6,7 @@
#include <string>
-#include "base/env_var.h"
+#include "base/environment.h"
#include "base/path_service.h"
#include "base/process_util.h"
#include "base/string_number_conversions.h"
@@ -114,7 +114,7 @@ void UITestSuite::SuppressErrorDialogs() {
#if defined(OS_WIN)
void UITestSuite::LoadCrashService() {
- scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ scoped_ptr<base::Environment> env(base::Environment::Create());
if (env->HasEnv(env_vars::kHeadless))
return;