Refactor management of overview window copy lifetime into a separate class.
[chromium-blink-merge.git] / content / shell / browser / shell_url_request_context_getter.h
blobb18c0a94f0ed6c6361a5cfaaf8b1bdf9a4c3234e
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_
8 #include "base/compiler_specific.h"
9 #include "base/files/file_path.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/public/browser/content_browser_client.h"
13 #include "net/url_request/url_request_context_getter.h"
14 #include "net/url_request/url_request_job_factory.h"
16 namespace base {
17 class MessageLoop;
20 namespace net {
21 class HostResolver;
22 class MappedHostResolver;
23 class NetworkDelegate;
24 class NetLog;
25 class ProxyConfigService;
26 class URLRequestContextStorage;
29 namespace content {
31 class ShellURLRequestContextGetter : public net::URLRequestContextGetter {
32 public:
33 ShellURLRequestContextGetter(
34 bool ignore_certificate_errors,
35 const base::FilePath& base_path,
36 base::MessageLoop* io_loop,
37 base::MessageLoop* file_loop,
38 ProtocolHandlerMap* protocol_handlers,
39 net::NetLog* net_log);
41 // net::URLRequestContextGetter implementation.
42 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
43 virtual scoped_refptr<base::SingleThreadTaskRunner>
44 GetNetworkTaskRunner() const OVERRIDE;
46 net::HostResolver* host_resolver();
48 protected:
49 virtual ~ShellURLRequestContextGetter();
51 private:
52 bool ignore_certificate_errors_;
53 base::FilePath base_path_;
54 base::MessageLoop* io_loop_;
55 base::MessageLoop* file_loop_;
56 net::NetLog* net_log_;
58 scoped_ptr<net::ProxyConfigService> proxy_config_service_;
59 scoped_ptr<net::NetworkDelegate> network_delegate_;
60 scoped_ptr<net::URLRequestContextStorage> storage_;
61 scoped_ptr<net::URLRequestContext> url_request_context_;
62 ProtocolHandlerMap protocol_handlers_;
64 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter);
67 } // namespace content
69 #endif // CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_