Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1727)

Unified Diff: chrome/browser/platform_util_linux.cc

Issue 22750002: Move AlterEnvironment to base/environment.h, implement on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/nacl_host/nacl_process_host.cc ('k') | chrome/test/chromedriver/chrome_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/platform_util_linux.cc
diff --git a/chrome/browser/platform_util_linux.cc b/chrome/browser/platform_util_linux.cc
index 60d446714633c179e3c1102e0ee96a5195c90b60..5e65bc2e1606689538a251d3bd3d042afba23e3e 100644
--- a/chrome/browser/platform_util_linux.cc
+++ b/chrome/browser/platform_util_linux.cc
@@ -21,25 +21,22 @@ void XDGUtil(const std::string& util, const std::string& arg) {
argv.push_back(util);
argv.push_back(arg);
- base::EnvironmentVector env;
+ base::LaunchOptions options;
// xdg-open can fall back on mailcap which eventually might plumb through
// to a command that needs a terminal. Set the environment variable telling
// it that we definitely don't have a terminal available and that it should
// bring up a new terminal if necessary. See "man mailcap".
- env.push_back(std::make_pair("MM_NOTTTY", "1"));
+ options.environ["MM_NOTTTY"] = "1";
// In Google Chrome, we do not let GNOME's bug-buddy intercept our crashes.
// However, we do not want this environment variable to propagate to external
// applications. See http://crbug.com/24120
char* disable_gnome_bug_buddy = getenv("GNOME_DISABLE_CRASH_DIALOG");
if (disable_gnome_bug_buddy &&
- disable_gnome_bug_buddy == std::string("SET_BY_GOOGLE_CHROME")) {
- env.push_back(std::make_pair("GNOME_DISABLE_CRASH_DIALOG", ""));
- }
+ disable_gnome_bug_buddy == std::string("SET_BY_GOOGLE_CHROME"))
+ options.environ["GNOME_DISABLE_CRASH_DIALOG"] = std::string();
base::ProcessHandle handle;
- base::LaunchOptions options;
- options.environ = &env;
if (base::LaunchProcess(argv, options, &handle))
base::EnsureProcessGetsReaped(handle);
}
« no previous file with comments | « chrome/browser/nacl_host/nacl_process_host.cc ('k') | chrome/test/chromedriver/chrome_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698