diff --git a/cef1/libcef/browser_request_context.cc b/cef1/libcef/browser_request_context.cc index fcabe0ee9..619585d60 100644 --- a/cef1/libcef/browser_request_context.cc +++ b/cef1/libcef/browser_request_context.cc @@ -45,6 +45,7 @@ #include "webkit/user_agent/user_agent.h" #if defined(OS_WIN) +#include "net/proxy/proxy_config_service_win.h" #pragma comment(lib, "winhttp.lib") #endif @@ -181,6 +182,10 @@ void BrowserRequestContext::Init( if (app.get()) { CefRefPtr handler = app->GetProxyHandler(); if (handler) { +#if defined(OS_WIN) + // Force auto-detect so the client resolver will be called. + net::ProxyConfigServiceWin::set_force_auto_detect(true); +#endif // The client will provide proxy resolution. storage_.set_proxy_service( new net::ProxyService(CreateProxyConfigService(), diff --git a/cef1/patch/patch.cfg b/cef1/patch/patch.cfg index 9da3c2511..7fba005c6 100644 --- a/cef1/patch/patch.cfg +++ b/cef1/patch/patch.cfg @@ -26,6 +26,11 @@ patches = [ 'name': 'npapi_911', 'path': '../webkit/plugins/npapi/', }, + { + # http://code.google.com/p/chromiumembedded/issues/detail?id=918 + 'name': 'proxy_config_win_918', + 'path': '../net/proxy/', + }, { # http://code.google.com/p/chromiumembedded/issues/detail?id=364 'name': 'spi_webcore_364', diff --git a/cef1/patch/patches/proxy_config_win_918.patch b/cef1/patch/patches/proxy_config_win_918.patch new file mode 100644 index 000000000..16428e72b --- /dev/null +++ b/cef1/patch/patches/proxy_config_win_918.patch @@ -0,0 +1,44 @@ +Index: proxy_config_service_win.cc +=================================================================== +--- proxy_config_service_win.cc (revision 187217) ++++ proxy_config_service_win.cc (working copy) +@@ -36,6 +36,8 @@ + + } // namespace + ++bool ProxyConfigServiceWin::force_auto_detect_ = false; ++ + // RegKey and ObjectWatcher pair. + class ProxyConfigServiceWin::KeyEntry { + public: +@@ -170,7 +172,7 @@ + void ProxyConfigServiceWin::SetFromIEConfig( + ProxyConfig* config, + const WINHTTP_CURRENT_USER_IE_PROXY_CONFIG& ie_config) { +- if (ie_config.fAutoDetect) ++ if (ie_config.fAutoDetect || force_auto_detect_) + config->set_auto_detect(true); + if (ie_config.lpszProxy) { + // lpszProxy may be a single proxy, or a proxy per scheme. The format +Index: proxy_config_service_win.h +=================================================================== +--- proxy_config_service_win.h (revision 187217) ++++ proxy_config_service_win.h (working copy) +@@ -49,6 +49,8 @@ + // Overrides a function from PollingProxyConfigService. + virtual void AddObserver(Observer* observer) OVERRIDE; + ++ static void set_force_auto_detect(bool val) { force_auto_detect_ = val; } ++ + private: + FRIEND_TEST_ALL_PREFIXES(ProxyConfigServiceWinTest, SetFromIEConfig); + class KeyEntry; +@@ -73,6 +75,8 @@ + const WINHTTP_CURRENT_USER_IE_PROXY_CONFIG& ie_config); + + KeyEntryList keys_to_watch_; ++ ++ static bool force_auto_detect_; + }; + + } // namespace net