OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.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/http/http_network_session.h" | 13 #include "net/http/http_network_session.h" |
14 #include "net/url_request/url_request_context_getter.h" | 14 #include "net/url_request/url_request_context_getter.h" |
15 #include "net/url_request/url_request_job_factory.h" | 15 #include "net/url_request/url_request_job_factory.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 class CookieStore; | 18 class CookieStore; |
19 class HttpTransactionFactory; | 19 class HttpTransactionFactory; |
| 20 class NetLog; |
20 class ProxyConfigService; | 21 class ProxyConfigService; |
21 class URLRequestContext; | 22 class URLRequestContext; |
22 class URLRequestJobFactory; | 23 class URLRequestJobFactory; |
23 } | 24 } |
24 | 25 |
25 namespace data_reduction_proxy { | 26 namespace data_reduction_proxy { |
26 class DataReductionProxyAuthRequestHandler; | 27 class DataReductionProxyAuthRequestHandler; |
27 class DataReductionProxyConfigService; | 28 class DataReductionProxyConfigService; |
28 } | 29 } |
29 | 30 |
30 namespace android_webview { | 31 namespace android_webview { |
31 | 32 |
32 class AwNetworkDelegate; | 33 class AwNetworkDelegate; |
33 | 34 |
34 class AwURLRequestContextGetter : public net::URLRequestContextGetter { | 35 class AwURLRequestContextGetter : public net::URLRequestContextGetter { |
35 public: | 36 public: |
36 AwURLRequestContextGetter( | 37 AwURLRequestContextGetter( |
37 const base::FilePath& partition_path, | 38 const base::FilePath& partition_path, |
38 net::CookieStore* cookie_store, | 39 net::CookieStore* cookie_store, |
39 scoped_ptr<data_reduction_proxy::DataReductionProxyConfigService> | 40 scoped_ptr<data_reduction_proxy::DataReductionProxyConfigService> |
40 config_service); | 41 config_service, |
| 42 net::NetLog* net_log); |
41 | 43 |
42 void InitializeOnNetworkThread(); | 44 void InitializeOnNetworkThread(); |
43 | 45 |
44 // net::URLRequestContextGetter implementation. | 46 // net::URLRequestContextGetter implementation. |
45 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; | 47 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; |
46 virtual scoped_refptr<base::SingleThreadTaskRunner> | 48 virtual scoped_refptr<base::SingleThreadTaskRunner> |
47 GetNetworkTaskRunner() const OVERRIDE; | 49 GetNetworkTaskRunner() const OVERRIDE; |
48 | 50 |
49 data_reduction_proxy::DataReductionProxyAuthRequestHandler* | 51 data_reduction_proxy::DataReductionProxyAuthRequestHandler* |
50 GetDataReductionProxyAuthRequestHandler() const; | 52 GetDataReductionProxyAuthRequestHandler() const; |
(...skipping 16 matching lines...) Expand all Loading... |
67 | 69 |
68 const base::FilePath partition_path_; | 70 const base::FilePath partition_path_; |
69 scoped_refptr<net::CookieStore> cookie_store_; | 71 scoped_refptr<net::CookieStore> cookie_store_; |
70 scoped_ptr<net::URLRequestContext> url_request_context_; | 72 scoped_ptr<net::URLRequestContext> url_request_context_; |
71 scoped_ptr<data_reduction_proxy::DataReductionProxyConfigService> | 73 scoped_ptr<data_reduction_proxy::DataReductionProxyConfigService> |
72 data_reduction_proxy_config_service_; | 74 data_reduction_proxy_config_service_; |
73 scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> | 75 scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> |
74 data_reduction_proxy_auth_request_handler_; | 76 data_reduction_proxy_auth_request_handler_; |
75 scoped_ptr<net::URLRequestJobFactory> job_factory_; | 77 scoped_ptr<net::URLRequestJobFactory> job_factory_; |
76 scoped_ptr<net::HttpTransactionFactory> main_http_factory_; | 78 scoped_ptr<net::HttpTransactionFactory> main_http_factory_; |
| 79 net::NetLog* net_log_; |
77 | 80 |
78 // ProtocolHandlers and interceptors are stored here between | 81 // ProtocolHandlers and interceptors are stored here between |
79 // SetHandlersAndInterceptors() and the first GetURLRequestContext() call. | 82 // SetHandlersAndInterceptors() and the first GetURLRequestContext() call. |
80 content::ProtocolHandlerMap protocol_handlers_; | 83 content::ProtocolHandlerMap protocol_handlers_; |
81 content::URLRequestInterceptorScopedVector request_interceptors_; | 84 content::URLRequestInterceptorScopedVector request_interceptors_; |
82 | 85 |
83 DISALLOW_COPY_AND_ASSIGN(AwURLRequestContextGetter); | 86 DISALLOW_COPY_AND_ASSIGN(AwURLRequestContextGetter); |
84 }; | 87 }; |
85 | 88 |
86 } // namespace android_webview | 89 } // namespace android_webview |
87 | 90 |
88 #endif // ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_ | 91 #endif // ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_ |
OLD | NEW |