OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_URL_REQUEST_CONTEXT_GETTER_H_ |
6 #define CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_URL_REQUEST_CONTEXT_GETTER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | |
9 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted.h" | 9 #include "content/shell/browser/shell_url_request_context_getter.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" | |
15 | 10 |
16 namespace base { | 11 namespace base { |
17 class MessageLoop; | 12 class MessageLoop; |
18 } | 13 } |
19 | 14 |
20 namespace net { | 15 namespace net { |
21 class HostResolver; | |
22 class MappedHostResolver; | |
23 class NetworkDelegate; | 16 class NetworkDelegate; |
24 class NetLog; | 17 class NetLog; |
25 class ProxyConfigService; | |
26 class URLRequestContextStorage; | |
27 } | 18 } |
28 | 19 |
29 namespace content { | 20 namespace extensions { |
30 | 21 |
31 class ShellURLRequestContextGetter : public net::URLRequestContextGetter { | 22 class ExtensionURLRequestContextGetter : |
23 public content::ShellURLRequestContextGetter { | |
Fady Samuel
2014/09/29 20:43:55
Don't rely on code from ShellURLRequestContextGett
| |
32 public: | 24 public: |
33 ShellURLRequestContextGetter( | 25 //ExtensionURLRequestContextGetter() {} |
26 explicit ExtensionURLRequestContextGetter( | |
Fady Samuel
2014/09/29 20:43:55
Remove explicit.
| |
34 bool ignore_certificate_errors, | 27 bool ignore_certificate_errors, |
35 const base::FilePath& base_path, | 28 const base::FilePath& base_path, |
36 base::MessageLoop* io_loop, | 29 base::MessageLoop* io_loop, |
37 base::MessageLoop* file_loop, | 30 base::MessageLoop* file_loop, |
38 ProtocolHandlerMap* protocol_handlers, | 31 content::ProtocolHandlerMap* protocol_handlers, |
39 URLRequestInterceptorScopedVector request_interceptors, | 32 content::URLRequestInterceptorScopedVector request_interceptors, |
40 net::NetLog* net_log); | 33 net::NetLog* net_log); |
41 | 34 |
42 // net::URLRequestContextGetter implementation. | 35 // content::ShellURLRequestContextGetter implementation. |
43 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; | 36 virtual net::NetworkDelegate* CreateNetworkDelegate() OVERRIDE; |
44 virtual scoped_refptr<base::SingleThreadTaskRunner> | 37 protected: |
45 GetNetworkTaskRunner() const OVERRIDE; | 38 virtual ~ExtensionURLRequestContextGetter(); |
46 | 39 |
47 net::HostResolver* host_resolver(); | 40 private: |
48 | 41 DISALLOW_COPY_AND_ASSIGN(ExtensionURLRequestContextGetter); |
49 protected: | |
50 virtual ~ShellURLRequestContextGetter(); | |
51 | |
52 private: | |
53 bool ignore_certificate_errors_; | |
54 base::FilePath base_path_; | |
55 base::MessageLoop* io_loop_; | |
56 base::MessageLoop* file_loop_; | |
57 net::NetLog* net_log_; | |
58 | |
59 scoped_ptr<net::ProxyConfigService> proxy_config_service_; | |
60 scoped_ptr<net::NetworkDelegate> network_delegate_; | |
61 scoped_ptr<net::URLRequestContextStorage> storage_; | |
62 scoped_ptr<net::URLRequestContext> url_request_context_; | |
63 ProtocolHandlerMap protocol_handlers_; | |
64 URLRequestInterceptorScopedVector request_interceptors_; | |
65 | |
66 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter); | |
67 }; | 42 }; |
68 | 43 |
69 } // namespace content | 44 } // namespace extensions |
70 | 45 |
71 #endif // CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ | 46 #endif // EXTENSIONS_BROWSER_EXTENSION_URL_REQUEST_CONTEXT_GETTER_H_ |
OLD | NEW |