diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-27 01:08:03 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-27 01:08:03 +0000 |
commit | c5f1e3380f1e1b904420d6072f92484daf497a65 (patch) | |
tree | fd41400cc8ac32b90d1817bcd36cb6aa47842af7 /content/shell/shell_url_request_context_getter.h | |
parent | 5a3432f63636a3d05d73da60c54e83d2c77b57a3 (diff) | |
download | chromium_src-c5f1e3380f1e1b904420d6072f92484daf497a65.zip chromium_src-c5f1e3380f1e1b904420d6072f92484daf497a65.tar.gz chromium_src-c5f1e3380f1e1b904420d6072f92484daf497a65.tar.bz2 |
Split off content_shell's ResourceContext and URLRequestContextGetter implementations into separate files to improve readability.BUG=90445
Review URL: http://codereview.chromium.org/8037037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/shell_url_request_context_getter.h')
-rw-r--r-- | content/shell/shell_url_request_context_getter.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/content/shell/shell_url_request_context_getter.h b/content/shell/shell_url_request_context_getter.h new file mode 100644 index 0000000..a4ba171 --- /dev/null +++ b/content/shell/shell_url_request_context_getter.h @@ -0,0 +1,69 @@ +// Copyright (c) 2011 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. + +#ifndef CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ +#define CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ +#pragma once + +#include "base/compiler_specific.h" +#include "base/file_path.h" +#include "base/memory/ref_counted.h" +#include "base/memory/scoped_ptr.h" +#include "net/url_request/url_request_context_getter.h" + +class MessageLoop; + +namespace net { +class CertVerifier; +class DnsRRResolver; +class HostResolver; +class HttpAuthHandlerFactory; +class HttpTransactionFactory; +class ProxyService; +class OriginBoundCertService; +class URLRequestJobFactory; +class URLSecurityManager; +} + +namespace content { + +class ShellURLRequestContextGetter : public net::URLRequestContextGetter { + public: + ShellURLRequestContextGetter( + const FilePath& base_path_, + MessageLoop* io_loop, + MessageLoop* file_loop); + virtual ~ShellURLRequestContextGetter(); + + // net::URLRequestContextGetter implementation. + virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; + virtual net::CookieStore* DONTUSEME_GetCookieStore() OVERRIDE; + virtual scoped_refptr<base::MessageLoopProxy> + GetIOMessageLoopProxy() const OVERRIDE; + + net::HostResolver* host_resolver() { return host_resolver_.get(); } + + private: + FilePath base_path_; + MessageLoop* io_loop_; + MessageLoop* file_loop_; + + scoped_ptr<net::URLRequestJobFactory> job_factory_; + scoped_refptr<net::URLRequestContext> url_request_context_; + + scoped_ptr<net::HttpTransactionFactory> main_http_factory_; + scoped_ptr<net::HostResolver> host_resolver_; + scoped_ptr<net::CertVerifier> cert_verifier_; + scoped_ptr<net::OriginBoundCertService> origin_bound_cert_service_; + scoped_ptr<net::DnsRRResolver> dnsrr_resolver_; + scoped_ptr<net::ProxyService> proxy_service_; + scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory_; + scoped_ptr<net::URLSecurityManager> url_security_manager_; + + DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter); +}; + +} // namespace content + +#endif // CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ |