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" |
(...skipping 24 matching lines...) Expand all Loading... |
35 ShellURLRequestContextGetter( | 35 ShellURLRequestContextGetter( |
36 bool ignore_certificate_errors, | 36 bool ignore_certificate_errors, |
37 const base::FilePath& base_path, | 37 const base::FilePath& base_path, |
38 base::MessageLoop* io_loop, | 38 base::MessageLoop* io_loop, |
39 base::MessageLoop* file_loop, | 39 base::MessageLoop* file_loop, |
40 ProtocolHandlerMap* protocol_handlers, | 40 ProtocolHandlerMap* protocol_handlers, |
41 URLRequestInterceptorScopedVector request_interceptors, | 41 URLRequestInterceptorScopedVector request_interceptors, |
42 net::NetLog* net_log); | 42 net::NetLog* net_log); |
43 | 43 |
44 // net::URLRequestContextGetter implementation. | 44 // net::URLRequestContextGetter implementation. |
45 virtual net::URLRequestContext* GetURLRequestContext() override; | 45 net::URLRequestContext* GetURLRequestContext() override; |
46 virtual scoped_refptr<base::SingleThreadTaskRunner> | 46 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() |
47 GetNetworkTaskRunner() const override; | 47 const override; |
48 | |
49 | 48 |
50 net::HostResolver* host_resolver(); | 49 net::HostResolver* host_resolver(); |
51 | 50 |
52 protected: | 51 protected: |
53 virtual ~ShellURLRequestContextGetter(); | 52 ~ShellURLRequestContextGetter() override; |
54 | 53 |
55 // Used by subclasses to create their own implementation of NetworkDelegate | 54 // Used by subclasses to create their own implementation of NetworkDelegate |
56 // and net::ProxyService. | 55 // and net::ProxyService. |
57 virtual net::NetworkDelegate* CreateNetworkDelegate(); | 56 virtual net::NetworkDelegate* CreateNetworkDelegate(); |
58 virtual net::ProxyConfigService* GetProxyConfigService(); | 57 virtual net::ProxyConfigService* GetProxyConfigService(); |
59 virtual net::ProxyService* GetProxyService(); | 58 virtual net::ProxyService* GetProxyService(); |
60 | 59 |
61 private: | 60 private: |
62 bool ignore_certificate_errors_; | 61 bool ignore_certificate_errors_; |
63 base::FilePath base_path_; | 62 base::FilePath base_path_; |
64 base::MessageLoop* io_loop_; | 63 base::MessageLoop* io_loop_; |
65 base::MessageLoop* file_loop_; | 64 base::MessageLoop* file_loop_; |
66 net::NetLog* net_log_; | 65 net::NetLog* net_log_; |
67 | 66 |
68 scoped_ptr<net::ProxyConfigService> proxy_config_service_; | 67 scoped_ptr<net::ProxyConfigService> proxy_config_service_; |
69 scoped_ptr<net::NetworkDelegate> network_delegate_; | 68 scoped_ptr<net::NetworkDelegate> network_delegate_; |
70 scoped_ptr<net::URLRequestContextStorage> storage_; | 69 scoped_ptr<net::URLRequestContextStorage> storage_; |
71 scoped_ptr<net::URLRequestContext> url_request_context_; | 70 scoped_ptr<net::URLRequestContext> url_request_context_; |
72 ProtocolHandlerMap protocol_handlers_; | 71 ProtocolHandlerMap protocol_handlers_; |
73 URLRequestInterceptorScopedVector request_interceptors_; | 72 URLRequestInterceptorScopedVector request_interceptors_; |
74 | 73 |
75 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter); | 74 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter); |
76 }; | 75 }; |
77 | 76 |
78 } // namespace content | 77 } // namespace content |
79 | 78 |
80 #endif // CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ | 79 #endif // CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ |
OLD | NEW |