Add initial Linux support (issue #40).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@338 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-10-24 20:20:52 +00:00
parent becadcfd16
commit 7a91ff899f
25 changed files with 986 additions and 51 deletions

View File

@@ -129,10 +129,24 @@ void BrowserRequestContext::Init(
#endif // defined(OS_WIN)
if (!proxy_service()) {
// Use the system proxy resolver.
#if defined(OS_POSIX) && !defined(OS_MACOSX)
// Use no proxy to avoid ProxyConfigServiceLinux.
// Enabling use of the ProxyConfigServiceLinux requires:
// -Calling from a thread with a TYPE_UI MessageLoop,
// -If at all possible, passing in a pointer to the IO thread's MessageLoop,
// -Keep in mind that proxy auto configuration is also
// non-functional on linux in this context because of v8 threading
// issues.
// TODO(port): rename "linux" to some nonspecific unix.
scoped_ptr<net::ProxyConfigService> proxy_config_service(
new net::ProxyConfigServiceFixed(net::ProxyConfig()));
#else
// Use the system proxy settings.
scoped_ptr<net::ProxyConfigService> proxy_config_service(
net::ProxyService::CreateSystemProxyConfigService(
MessageLoop::current(), NULL));
#endif
storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver(
proxy_config_service.release(), 0, NULL));
}