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

Unified Diff: net/proxy/proxy_config_service_linux.cc

Issue 10580009: Linux: allow proxy PAC file configurations that use just a file path without a file:// prefix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | « no previous file | net/proxy/proxy_config_service_linux_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_config_service_linux.cc
===================================================================
--- net/proxy/proxy_config_service_linux.cc (revision 142810)
+++ net/proxy/proxy_config_service_linux.cc (working copy)
@@ -1445,11 +1445,14 @@
}
if (mode == "auto") {
- // automatic proxy config
+ // Automatic proxy config.
std::string pac_url_str;
if (setting_getter_->GetString(SettingGetter::PROXY_AUTOCONF_URL,
&pac_url_str)) {
if (!pac_url_str.empty()) {
+ // If the PAC URL is actually a file path, then put file:// in front.
+ if (pac_url_str[0] == '/')
+ pac_url_str = "file://" + pac_url_str;
GURL pac_url(pac_url_str);
if (!pac_url.is_valid())
return false;
« no previous file with comments | « no previous file | net/proxy/proxy_config_service_linux_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698