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 <memory> |
| 9 |
8 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
9 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "content/public/browser/browser_context.h" | 14 #include "content/public/browser/browser_context.h" |
14 #include "net/proxy/proxy_config_service.h" | 15 #include "net/proxy/proxy_config_service.h" |
15 #include "net/url_request/url_request_context_getter.h" | 16 #include "net/url_request/url_request_context_getter.h" |
16 #include "net/url_request/url_request_job_factory.h" | 17 #include "net/url_request/url_request_job_factory.h" |
17 | 18 |
18 namespace base { | 19 namespace base { |
19 class MessageLoop; | 20 class MessageLoop; |
20 } | 21 } |
21 | 22 |
22 namespace net { | 23 namespace net { |
(...skipping 24 matching lines...) Expand all Loading... |
47 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() | 48 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() |
48 const override; | 49 const override; |
49 | 50 |
50 net::HostResolver* host_resolver(); | 51 net::HostResolver* host_resolver(); |
51 | 52 |
52 protected: | 53 protected: |
53 ~ShellURLRequestContextGetter() override; | 54 ~ShellURLRequestContextGetter() override; |
54 | 55 |
55 // Used by subclasses to create their own implementation of NetworkDelegate | 56 // Used by subclasses to create their own implementation of NetworkDelegate |
56 // and net::ProxyService. | 57 // and net::ProxyService. |
57 virtual scoped_ptr<net::NetworkDelegate> CreateNetworkDelegate(); | 58 virtual std::unique_ptr<net::NetworkDelegate> CreateNetworkDelegate(); |
58 virtual scoped_ptr<net::ProxyConfigService> GetProxyConfigService(); | 59 virtual std::unique_ptr<net::ProxyConfigService> GetProxyConfigService(); |
59 virtual scoped_ptr<net::ProxyService> GetProxyService(); | 60 virtual std::unique_ptr<net::ProxyService> GetProxyService(); |
60 | 61 |
61 private: | 62 private: |
62 bool ignore_certificate_errors_; | 63 bool ignore_certificate_errors_; |
63 base::FilePath base_path_; | 64 base::FilePath base_path_; |
64 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 65 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
65 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; | 66 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; |
66 net::NetLog* net_log_; | 67 net::NetLog* net_log_; |
67 | 68 |
68 scoped_ptr<net::ProxyConfigService> proxy_config_service_; | 69 std::unique_ptr<net::ProxyConfigService> proxy_config_service_; |
69 scoped_ptr<net::NetworkDelegate> network_delegate_; | 70 std::unique_ptr<net::NetworkDelegate> network_delegate_; |
70 scoped_ptr<net::URLRequestContextStorage> storage_; | 71 std::unique_ptr<net::URLRequestContextStorage> storage_; |
71 scoped_ptr<net::URLRequestContext> url_request_context_; | 72 std::unique_ptr<net::URLRequestContext> url_request_context_; |
72 ProtocolHandlerMap protocol_handlers_; | 73 ProtocolHandlerMap protocol_handlers_; |
73 URLRequestInterceptorScopedVector request_interceptors_; | 74 URLRequestInterceptorScopedVector request_interceptors_; |
74 | 75 |
75 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter); | 76 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter); |
76 }; | 77 }; |
77 | 78 |
78 } // namespace content | 79 } // namespace content |
79 | 80 |
80 #endif // CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ | 81 #endif // CONTENT_SHELL_BROWSER_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ |
OLD | NEW |