| 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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // later install into |job_factory_|. This ordering is enforced by having | 51 // later install into |job_factory_|. This ordering is enforced by having |
| 52 // AwBrowserContext::CreateRequestContext() call SetProtocolHandlers(). | 52 // AwBrowserContext::CreateRequestContext() call SetProtocolHandlers(). |
| 53 // SetProtocolHandlers() is necessary because the ProtocolHandlers are created | 53 // SetProtocolHandlers() is necessary because the ProtocolHandlers are created |
| 54 // on the UI thread while |job_factory_| must be created on the IO thread. | 54 // on the UI thread while |job_factory_| must be created on the IO thread. |
| 55 void SetProtocolHandlers( | 55 void SetProtocolHandlers( |
| 56 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 56 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 57 blob_protocol_handler, | 57 blob_protocol_handler, |
| 58 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 58 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 59 file_system_protocol_handler, | 59 file_system_protocol_handler, |
| 60 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 60 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 61 developer_protocol_handler, | |
| 62 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 63 chrome_protocol_handler, | 61 chrome_protocol_handler, |
| 64 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 62 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 65 chrome_devtools_protocol_handler); | 63 chrome_devtools_protocol_handler); |
| 66 | 64 |
| 67 void PopulateNetworkSessionParams(net::HttpNetworkSession::Params* params); | 65 void PopulateNetworkSessionParams(net::HttpNetworkSession::Params* params); |
| 68 | 66 |
| 69 AwBrowserContext* browser_context_; // weak | 67 AwBrowserContext* browser_context_; // weak |
| 70 scoped_ptr<net::URLRequestContext> url_request_context_; | 68 scoped_ptr<net::URLRequestContext> url_request_context_; |
| 71 scoped_ptr<net::ProxyConfigService> proxy_config_service_; | 69 scoped_ptr<net::ProxyConfigService> proxy_config_service_; |
| 72 scoped_ptr<net::URLRequestJobFactory> job_factory_; | 70 scoped_ptr<net::URLRequestJobFactory> job_factory_; |
| 73 scoped_ptr<net::HttpTransactionFactory> main_http_factory_; | 71 scoped_ptr<net::HttpTransactionFactory> main_http_factory_; |
| 74 | 72 |
| 75 // ProtocolHandlers are stored here between SetProtocolHandlers() and the | 73 // ProtocolHandlers are stored here between SetProtocolHandlers() and the |
| 76 // first GetURLRequestContext() call. | 74 // first GetURLRequestContext() call. |
| 77 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> blob_protocol_handler_; | 75 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> blob_protocol_handler_; |
| 78 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 76 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 79 file_system_protocol_handler_; | 77 file_system_protocol_handler_; |
| 80 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 78 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 81 developer_protocol_handler_; | |
| 82 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 83 chrome_protocol_handler_; | 79 chrome_protocol_handler_; |
| 84 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 80 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 85 chrome_devtools_protocol_handler_; | 81 chrome_devtools_protocol_handler_; |
| 86 | 82 |
| 87 DISALLOW_COPY_AND_ASSIGN(AwURLRequestContextGetter); | 83 DISALLOW_COPY_AND_ASSIGN(AwURLRequestContextGetter); |
| 88 }; | 84 }; |
| 89 | 85 |
| 90 } // namespace android_webview | 86 } // namespace android_webview |
| 91 | 87 |
| 92 #endif // ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_ | 88 #endif // ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_ |
| OLD | NEW |