Windows: Have Chromium's ProxyConfigServiceWin internally ignore the system "Automatically detect proxy settings" value. This causes CefProxyHandler::GetProxyForUrl() to be called in all cases (issue #918).
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1364@1153 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
4762e76ed4
commit
18814c0784
|
@ -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<CefProxyHandler> 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(),
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue