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 CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ |
6 #define CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "content/public/browser/content_browser_client.h" | 12 #include "content/public/browser/content_browser_client.h" |
13 #include "net/url_request/url_request_context_getter.h" | 13 #include "net/url_request/url_request_context_getter.h" |
14 #include "net/url_request/url_request_job_factory.h" | 14 #include "net/url_request/url_request_job_factory.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class MessageLoop; | 17 class MessageLoop; |
18 } | 18 } |
19 | 19 |
20 namespace extensions { | |
James Cook
2014/10/07 16:24:54
Delete this. It's not needed, and you can't refer
Xi Han
2014/10/07 19:29:53
Oops, thanks for catching it! Removed.
On 2014/10
| |
21 class InfoMap; | |
22 } | |
23 | |
20 namespace net { | 24 namespace net { |
21 class HostResolver; | 25 class HostResolver; |
22 class MappedHostResolver; | 26 class MappedHostResolver; |
23 class NetworkDelegate; | 27 class NetworkDelegate; |
24 class NetLog; | 28 class NetLog; |
25 class ProxyConfigService; | 29 class ProxyConfigService; |
26 class URLRequestContextStorage; | 30 class URLRequestContextStorage; |
27 } | 31 } |
28 | 32 |
29 namespace content { | 33 namespace content { |
30 | 34 |
31 class ShellURLRequestContextGetter : public net::URLRequestContextGetter { | 35 class ShellURLRequestContextGetter : public net::URLRequestContextGetter { |
32 public: | 36 public: |
33 ShellURLRequestContextGetter( | 37 ShellURLRequestContextGetter( |
34 bool ignore_certificate_errors, | 38 bool ignore_certificate_errors, |
35 const base::FilePath& base_path, | 39 const base::FilePath& base_path, |
36 base::MessageLoop* io_loop, | 40 base::MessageLoop* io_loop, |
37 base::MessageLoop* file_loop, | 41 base::MessageLoop* file_loop, |
38 ProtocolHandlerMap* protocol_handlers, | 42 ProtocolHandlerMap* protocol_handlers, |
39 URLRequestInterceptorScopedVector request_interceptors, | 43 URLRequestInterceptorScopedVector request_interceptors, |
40 net::NetLog* net_log); | 44 net::NetLog* net_log); |
41 | 45 |
42 // net::URLRequestContextGetter implementation. | 46 // net::URLRequestContextGetter implementation. |
43 virtual net::URLRequestContext* GetURLRequestContext() override; | 47 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; |
James Cook
2014/10/07 16:24:54
We're transitioning to C++11, this should be lower
Xi Han
2014/10/07 19:29:53
Updated.
On 2014/10/07 16:24:54, James Cook wrote
| |
44 virtual scoped_refptr<base::SingleThreadTaskRunner> | 48 virtual scoped_refptr<base::SingleThreadTaskRunner> |
45 GetNetworkTaskRunner() const override; | 49 GetNetworkTaskRunner() const OVERRIDE; |
50 | |
51 virtual net::NetworkDelegate* CreateNetworkDelegate(); | |
James Cook
2014/10/07 16:24:54
brief comment please
Xi Han
2014/10/07 19:29:53
Done.
| |
46 | 52 |
47 net::HostResolver* host_resolver(); | 53 net::HostResolver* host_resolver(); |
48 | 54 |
49 protected: | 55 protected: |
50 virtual ~ShellURLRequestContextGetter(); | 56 virtual ~ShellURLRequestContextGetter(); |
51 | 57 |
52 private: | 58 private: |
53 bool ignore_certificate_errors_; | 59 bool ignore_certificate_errors_; |
54 base::FilePath base_path_; | 60 base::FilePath base_path_; |
55 base::MessageLoop* io_loop_; | 61 base::MessageLoop* io_loop_; |
56 base::MessageLoop* file_loop_; | 62 base::MessageLoop* file_loop_; |
57 net::NetLog* net_log_; | 63 net::NetLog* net_log_; |
58 | 64 |
59 scoped_ptr<net::ProxyConfigService> proxy_config_service_; | 65 scoped_ptr<net::ProxyConfigService> proxy_config_service_; |
60 scoped_ptr<net::NetworkDelegate> network_delegate_; | 66 scoped_ptr<net::NetworkDelegate> network_delegate_; |
61 scoped_ptr<net::URLRequestContextStorage> storage_; | 67 scoped_ptr<net::URLRequestContextStorage> storage_; |
62 scoped_ptr<net::URLRequestContext> url_request_context_; | 68 scoped_ptr<net::URLRequestContext> url_request_context_; |
63 ProtocolHandlerMap protocol_handlers_; | 69 ProtocolHandlerMap protocol_handlers_; |
64 URLRequestInterceptorScopedVector request_interceptors_; | 70 URLRequestInterceptorScopedVector request_interceptors_; |
65 | 71 |
66 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter); | 72 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter); |
67 }; | 73 }; |
68 | 74 |
69 } // namespace content | 75 } // namespace content |
70 | 76 |
71 #endif // CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ | 77 #endif // CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ |
OLD | NEW |