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

Unified Diff: webkit/tools/test_shell/test_shell_request_context.cc

Issue 258008: Move initialization of ChromeURLRequestContexts to the IO thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync again, just in case Created 11 years, 2 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 | « net/proxy/proxy_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_request_context.cc
===================================================================
--- webkit/tools/test_shell/test_shell_request_context.cc (revision 29872)
+++ webkit/tools/test_shell/test_shell_request_context.cc (working copy)
@@ -11,6 +11,8 @@
#include "net/base/host_resolver.h"
#include "net/base/ssl_config_service.h"
#include "net/ftp/ftp_network_layer.h"
+#include "net/proxy/proxy_config_service.h"
+#include "net/proxy/proxy_config_service_fixed.h"
#include "net/proxy/proxy_service.h"
#include "webkit/glue/webkit_glue.h"
@@ -35,21 +37,24 @@
accept_language_ = "en-us,en";
accept_charset_ = "iso-8859-1,*,utf-8";
- net::ProxyConfig proxy_config;
#if defined(OS_LINUX)
- // Force no_proxy to true so as to use a fixed proxy configuration
- // and bypass ProxyConfigServiceLinux. Enabling use of the
- // ProxyConfigServiceLinux requires:
+ // 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.
- no_proxy = true;
+ 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(NULL, NULL));
#endif
host_resolver_ = net::CreateSystemHostResolver();
- proxy_service_ = net::ProxyService::Create(no_proxy ? &proxy_config : NULL,
- false, NULL, NULL, NULL);
+ proxy_service_ = net::ProxyService::Create(proxy_config_service.release(),
+ false, NULL, NULL);
ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService();
net::HttpCache *cache;
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698