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