summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-01 02:06:18 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-01 02:06:18 +0000
commit442d293cc0b415c6f20231ea2a577b316162c5be (patch)
tree00a3c05ce411d9126e434d0535973137f0653d5d /chrome
parent2f2afba1c5f04e5f83d7c62873bef8a0d166f291 (diff)
downloadchromium_src-442d293cc0b415c6f20231ea2a577b316162c5be.zip
chromium_src-442d293cc0b415c6f20231ea2a577b316162c5be.tar.gz
chromium_src-442d293cc0b415c6f20231ea2a577b316162c5be.tar.bz2
Linux: On unsupported DE, show local help page about configuring proxies.
BUG=30657 TEST=unset GNOME_DESKTOP_SESSION_ID; run chrome and try to launch proxy config. Review URL: http://codereview.chromium.org/1541007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43307 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/generated_resources.grd22
-rw-r--r--chrome/browser/browser_about_handler.cc22
-rw-r--r--chrome/browser/gtk/options/advanced_contents_gtk.cc3
3 files changed, 45 insertions, 2 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 9889e90..f717b28 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -7431,6 +7431,28 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_BOOKMARK_BAR_IMPORT_LINK" desc="text shown for importing ">
Import bookmarks now...
</message>
+
+ <!-- Linux proxy configuration fallback help -->
+ <message name="IDS_ABOUT_LINUX_PROXY_CONFIG_TITLE" desc="Title of HTML page shown on systems where system proxy configuration is unsupported.">
+ Linux Proxy Configuration Help
+ </message>
+ <message name="IDS_ABOUT_LINUX_PROXY_CONFIG_BODY" desc="HTML body of page shown on systems where system proxy configuration is unsupported.">
+ When running <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> under a supported Desktop Environment, the system proxy settings will be used. However, either your system is not supported or there was a problem launching your system configuration. You may use the following environment variables to configure your proxy:
+ <ph name="BEGIN_LIST">&lt;ul&gt;</ph>
+ <ph name="BEGIN_LIST_ITEM">&lt;li&gt;</ph><ph name="BEGIN_CODE">&lt;code&gt;</ph>auto_proxy<ph name="END_CODE">&lt;/code&gt;</ph><ph name="END_LIST_ITEM">&lt;/li&gt;</ph>
+ <ph name="BEGIN_LIST">&lt;ul&gt;</ph>
+ <ph name="BEGIN_LIST_ITEM">&lt;li&gt;</ph>Defined and empty → autodetect<ph name="END_LIST_ITEM">&lt;/li&gt;</ph>
+ <ph name="BEGIN_LIST_ITEM">&lt;li&gt;</ph>Non-empty → specifies autoconfig URL<ph name="END_LIST_ITEM">&lt;/li&gt;</ph>
+ <ph name="END_LIST">&lt;/ul&gt;</ph>
+ <ph name="BEGIN_LIST_ITEM">&lt;li&gt;</ph><ph name="BEGIN_CODE">&lt;code&gt;</ph>all_proxy<ph name="END_CODE">&lt;/code&gt;</ph>: proxy server to use for all types<ph name="END_LIST_ITEM">&lt;/li&gt;</ph>
+ <ph name="BEGIN_LIST_ITEM">&lt;li&gt;</ph><ph name="BEGIN_CODE">&lt;code&gt;</ph>http_proxy<ph name="END_CODE">&lt;/code&gt;</ph>: HTTP proxy server<ph name="END_LIST_ITEM">&lt;/li&gt;</ph>
+ <ph name="BEGIN_LIST_ITEM">&lt;li&gt;</ph><ph name="BEGIN_CODE">&lt;code&gt;</ph>https_proxy<ph name="END_CODE">&lt;/code&gt;</ph>: HTTPS proxy server<ph name="END_LIST_ITEM">&lt;/li&gt;</ph>
+ <ph name="BEGIN_LIST_ITEM">&lt;li&gt;</ph><ph name="BEGIN_CODE">&lt;code&gt;</ph>ftp_proxy<ph name="END_CODE">&lt;/code&gt;</ph>: FTP proxy server<ph name="END_LIST_ITEM">&lt;/li&gt;</ph>
+ <ph name="BEGIN_LIST_ITEM">&lt;li&gt;</ph><ph name="BEGIN_CODE">&lt;code&gt;</ph>SOCKS_SERVER<ph name="END_CODE">&lt;/code&gt;</ph>: SOCKS proxy server (defaults to SOCKS v4, also specify SOCKS_VERSION=5 to use SOCKS v5)<ph name="END_LIST_ITEM">&lt;/li&gt;</ph>
+ <ph name="BEGIN_LIST_ITEM">&lt;li&gt;</ph><ph name="BEGIN_CODE">&lt;code&gt;</ph>no_proxy<ph name="END_CODE">&lt;/code&gt;</ph>: comma separated list of hosts or patterns to bypass proxying<ph name="END_LIST_ITEM">&lt;/li&gt;</ph>
+ <ph name="END_LIST">&lt;/ul&gt;</ph>
+ </message>
+
</messages>
<structures first_id="50000" fallback_to_english="true">
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index 04955ec..af05798 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -92,6 +92,10 @@ const char kTcmallocPath[] = "tcmalloc";
const char kTermsPath[] = "terms";
const char kVersionPath[] = "version";
+#if defined(OS_LINUX)
+const char kLinuxProxyConfigPath[] = "linux-proxy-config";
+#endif
+
#if defined(OS_CHROMEOS)
const char kOSCreditsPath[] = "os-credits";
#endif
@@ -447,6 +451,20 @@ std::string AboutStats() {
return data;
}
+#if defined(OS_LINUX)
+std::string AboutLinuxProxyConfig() {
+ std::string data;
+ data.append("<!DOCTYPE HTML>\n");
+ data.append("<html><head><meta charset=\"utf-8\"><title>");
+ data.append(l10n_util::GetStringUTF8(IDS_ABOUT_LINUX_PROXY_CONFIG_TITLE));
+ data.append("</title></head><body>\n");
+ data.append(l10n_util::GetStringFUTF8(IDS_ABOUT_LINUX_PROXY_CONFIG_BODY,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
+ data.append("</body></html>\n");
+ return data;
+}
+#endif
+
std::string AboutTerms() {
static const std::string terms_html =
ResourceBundle::GetSharedInstance().GetDataResource(
@@ -681,6 +699,10 @@ void AboutSource::StartDataRequest(const std::string& path_raw,
#endif
} else if (path == kTermsPath) {
response = AboutTerms();
+#if defined(OS_LINUX)
+ } else if (path == kLinuxProxyConfigPath) {
+ response = AboutLinuxProxyConfig();
+#endif
} else if (path == kSyncPath) {
response = AboutSync();
}
diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc
index 61dddb3..356fa42 100644
--- a/chrome/browser/gtk/options/advanced_contents_gtk.cc
+++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc
@@ -56,8 +56,7 @@ const char* const kLinuxCertificatesConfigUrl =
// The URL for Linux proxy configuration help when not running under a
// supported desktop environment.
-const char* const kLinuxProxyConfigUrl =
- "http://code.google.com/p/chromium/wiki/LinuxProxyConfig";
+const char kLinuxProxyConfigUrl[] = "about:linux-proxy-config";
// The pixel width we wrap labels at.
// TODO(evanm): make the labels wrap at the appropriate width.