diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-14 02:40:35 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-14 02:40:35 +0000 |
commit | 5cba3bf230f84b111530d0478c95dda25e677e58 (patch) | |
tree | 03969d9108908393f3e364b9e8de89026d29c27c /content/shell/shell_url_request_context_getter.cc | |
parent | 1558fff3237b89156cb0c91a693122131533c286 (diff) | |
download | chromium_src-5cba3bf230f84b111530d0478c95dda25e677e58.zip chromium_src-5cba3bf230f84b111530d0478c95dda25e677e58.tar.gz chromium_src-5cba3bf230f84b111530d0478c95dda25e677e58.tar.bz2 |
Content: First draft at a content_shell on GTK.
THIS IS NOT READY FOR DAILY USE.
The shell, in its current state, can bring up the default google.com
homepage. And that's about it. There are problems with the url bar,
scrolling (weird crashes complaining about not having a
ResourceBundle), it breaks badly on popups, et cetera.
BUG=90445
TEST=none; this is a testing tool.
Review URL: http://codereview.chromium.org/9213012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117768 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/shell_url_request_context_getter.cc')
-rw-r--r-- | content/shell/shell_url_request_context_getter.cc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/content/shell/shell_url_request_context_getter.cc b/content/shell/shell_url_request_context_getter.cc index 05e4893..b21c9b3 100644 --- a/content/shell/shell_url_request_context_getter.cc +++ b/content/shell/shell_url_request_context_getter.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -24,11 +24,21 @@ namespace content { ShellURLRequestContextGetter::ShellURLRequestContextGetter( - const FilePath& base_path_, + const FilePath& base_path, MessageLoop* io_loop, MessageLoop* file_loop) - : io_loop_(io_loop), + : base_path_(base_path), + io_loop_(io_loop), file_loop_(file_loop) { + // Must first be created on the UI thread. + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + + // We must create the proxy config service on the UI loop on Linux because it + // must synchronously run on the glib message loop. This will be passed to + // the URLRequestContextStorage on the IO thread in GetURLRequestContext(). + proxy_config_service_.reset( + net::ProxyService::CreateSystemProxyConfigService( + io_loop_, file_loop_)); } ShellURLRequestContextGetter::~ShellURLRequestContextGetter() { @@ -47,9 +57,6 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() { url_request_context_->set_accept_language("en-us,en"); url_request_context_->set_accept_charset("iso-8859-1,*,utf-8"); - scoped_ptr<net::ProxyConfigService> proxy_config_service( - net::ProxyService::CreateSystemProxyConfigService( - io_loop_, file_loop_)); storage_->set_host_resolver( net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, net::HostResolver::kDefaultRetryAttempts, @@ -58,7 +65,7 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() { // TODO(jam): use v8 if possible, look at chrome code. storage_->set_proxy_service( net::ProxyService::CreateUsingSystemProxyResolver( - proxy_config_service.release(), + proxy_config_service_.release(), 0, NULL)); storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults); |