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

Unified Diff: chrome/browser/gtk/options/advanced_contents_gtk.cc

Issue 159297: linux: generalize desktop environment guessing to encompass KDE (Closed)
Patch Set: fixed Created 11 years, 5 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 | « base/linux_util.cc ('k') | net/proxy/proxy_config_service_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/options/advanced_contents_gtk.cc
diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc
index 7aa21b28adb16e49e9a9ea2ecf4fcfc20438ae0a..fdae7b78a5974398ef7e98c2e47f108df2f41768 100644
--- a/chrome/browser/gtk/options/advanced_contents_gtk.cc
+++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc
@@ -302,23 +302,33 @@ void NetworkSection::OnChangeProxiesButtonClicked(GtkButton *button,
scoped_ptr<base::EnvironmentVariableGetter> env_getter(
base::EnvironmentVariableGetter::Create());
- if (base::UseGnomeForSettings(env_getter.get())) {
- std::vector<std::string> argv;
- argv.push_back(kProxyConfigBinary);
- base::file_handle_mapping_vector no_files;
- base::environment_vector env;
- base::ProcessHandle handle;
- env.push_back(std::make_pair("GTK_PATH",
- getenv("CHROMIUM_SAVED_GTK_PATH")));
- if (!base::LaunchApp(argv, env, no_files, false, &handle)) {
- LOG(ERROR) << "OpenProxyConfigDialogTask failed";
- return;
+
+ switch (base::GetDesktopEnvironment(env_getter.get())) {
+ case base::DESKTOP_ENVIRONMENT_GNOME: {
+ std::vector<std::string> argv;
+ argv.push_back(kProxyConfigBinary);
+ base::file_handle_mapping_vector no_files;
+ base::environment_vector env;
+ base::ProcessHandle handle;
+ env.push_back(std::make_pair("GTK_PATH",
+ getenv("CHROMIUM_SAVED_GTK_PATH")));
+ if (!base::LaunchApp(argv, env, no_files, false, &handle)) {
+ LOG(ERROR) << "OpenProxyConfigDialogTask failed";
+ return;
+ }
+ ProcessWatcher::EnsureProcessGetsReaped(handle);
+ break;
}
- ProcessWatcher::EnsureProcessGetsReaped(handle);
- } else {
- BrowserList::GetLastActive()->
- OpenURL(GURL(l10n_util::GetStringUTF8(IDS_LINUX_PROXY_CONFIG_URL)),
- GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
+
+ case base::DESKTOP_ENVIRONMENT_KDE:
+ NOTIMPLEMENTED() << "Bug 17363: obey KDE proxy settings.";
+ // Fall through to default behavior for now.
+
+ case base::DESKTOP_ENVIRONMENT_OTHER:
+ BrowserList::GetLastActive()->
+ OpenURL(GURL(l10n_util::GetStringUTF8(IDS_LINUX_PROXY_CONFIG_URL)),
+ GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
+ break;
}
}
« no previous file with comments | « base/linux_util.cc ('k') | net/proxy/proxy_config_service_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698