| 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 #include "android_webview/browser/net/aw_url_request_context_getter.h" | 5 #include "android_webview/browser/net/aw_url_request_context_getter.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "android_webview/browser/aw_browser_context.h" | 10 #include "android_webview/browser/aw_browser_context.h" |
| 11 #include "android_webview/browser/aw_content_browser_client.h" | 11 #include "android_webview/browser/aw_content_browser_client.h" |
| 12 #include "android_webview/browser/net/aw_cookie_store_wrapper.h" | 12 #include "android_webview/browser/net/aw_cookie_store_wrapper.h" |
| 13 #include "android_webview/browser/net/aw_http_user_agent_settings.h" | 13 #include "android_webview/browser/net/aw_http_user_agent_settings.h" |
| 14 #include "android_webview/browser/net/aw_network_delegate.h" | 14 #include "android_webview/browser/net/aw_network_delegate.h" |
| 15 #include "android_webview/browser/net/aw_request_interceptor.h" | 15 #include "android_webview/browser/net/aw_request_interceptor.h" |
| 16 #include "android_webview/browser/net/aw_url_request_job_factory.h" | 16 #include "android_webview/browser/net/aw_url_request_job_factory.h" |
| 17 #include "android_webview/browser/net/init_native_callback.h" | 17 #include "android_webview/browser/net/init_native_callback.h" |
| 18 #include "android_webview/browser/net/token_binding_manager.h" | 18 #include "android_webview/browser/net/token_binding_manager.h" |
| 19 #include "android_webview/common/aw_content_client.h" | 19 #include "android_webview/common/aw_content_client.h" |
| 20 #include "base/bind.h" | 20 #include "base/bind.h" |
| 21 #include "base/command_line.h" | 21 #include "base/command_line.h" |
| 22 #include "base/files/file_path.h" | 22 #include "base/files/file_path.h" |
| 23 #include "base/memory/ptr_util.h" |
| 23 #include "base/strings/string_number_conversions.h" | 24 #include "base/strings/string_number_conversions.h" |
| 24 #include "base/threading/sequenced_worker_pool.h" | 25 #include "base/threading/sequenced_worker_pool.h" |
| 25 #include "base/threading/worker_pool.h" | 26 #include "base/threading/worker_pool.h" |
| 26 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" | 27 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" |
| 27 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw
ork_delegate.h" | 28 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw
ork_delegate.h" |
| 28 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_requ
est_options.h" | 29 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_requ
est_options.h" |
| 29 #include "components/prefs/pref_service.h" | 30 #include "components/prefs/pref_service.h" |
| 30 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
| 31 #include "content/public/browser/content_browser_client.h" | 32 #include "content/public/browser/content_browser_client.h" |
| 32 #include "content/public/browser/cookie_store_factory.h" | 33 #include "content/public/browser/cookie_store_factory.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 if (command_line.HasSwitch(switches::kTestingFixedHttpsPort)) { | 89 if (command_line.HasSwitch(switches::kTestingFixedHttpsPort)) { |
| 89 base::StringToInt(command_line.GetSwitchValueASCII( | 90 base::StringToInt(command_line.GetSwitchValueASCII( |
| 90 switches::kTestingFixedHttpsPort), &value); | 91 switches::kTestingFixedHttpsPort), &value); |
| 91 params->testing_fixed_https_port = value; | 92 params->testing_fixed_https_port = value; |
| 92 } | 93 } |
| 93 if (command_line.HasSwitch(switches::kIgnoreCertificateErrors)) { | 94 if (command_line.HasSwitch(switches::kIgnoreCertificateErrors)) { |
| 94 params->ignore_certificate_errors = true; | 95 params->ignore_certificate_errors = true; |
| 95 } | 96 } |
| 96 } | 97 } |
| 97 | 98 |
| 98 scoped_ptr<net::URLRequestJobFactory> CreateJobFactory( | 99 std::unique_ptr<net::URLRequestJobFactory> CreateJobFactory( |
| 99 content::ProtocolHandlerMap* protocol_handlers, | 100 content::ProtocolHandlerMap* protocol_handlers, |
| 100 content::URLRequestInterceptorScopedVector request_interceptors) { | 101 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 101 scoped_ptr<AwURLRequestJobFactory> aw_job_factory(new AwURLRequestJobFactory); | 102 std::unique_ptr<AwURLRequestJobFactory> aw_job_factory( |
| 103 new AwURLRequestJobFactory); |
| 102 // Note that the registered schemes must also be specified in | 104 // Note that the registered schemes must also be specified in |
| 103 // AwContentBrowserClient::IsHandledURL. | 105 // AwContentBrowserClient::IsHandledURL. |
| 104 bool set_protocol = aw_job_factory->SetProtocolHandler( | 106 bool set_protocol = aw_job_factory->SetProtocolHandler( |
| 105 url::kFileScheme, | 107 url::kFileScheme, |
| 106 make_scoped_ptr(new net::FileProtocolHandler( | 108 base::WrapUnique(new net::FileProtocolHandler( |
| 107 content::BrowserThread::GetBlockingPool() | 109 content::BrowserThread::GetBlockingPool() |
| 108 ->GetTaskRunnerWithShutdownBehavior( | 110 ->GetTaskRunnerWithShutdownBehavior( |
| 109 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)))); | 111 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)))); |
| 110 DCHECK(set_protocol); | 112 DCHECK(set_protocol); |
| 111 set_protocol = aw_job_factory->SetProtocolHandler( | 113 set_protocol = aw_job_factory->SetProtocolHandler( |
| 112 url::kDataScheme, make_scoped_ptr(new net::DataProtocolHandler())); | 114 url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler())); |
| 113 DCHECK(set_protocol); | 115 DCHECK(set_protocol); |
| 114 set_protocol = aw_job_factory->SetProtocolHandler( | 116 set_protocol = aw_job_factory->SetProtocolHandler( |
| 115 url::kBlobScheme, | 117 url::kBlobScheme, |
| 116 make_scoped_ptr((*protocol_handlers)[url::kBlobScheme].release())); | 118 base::WrapUnique((*protocol_handlers)[url::kBlobScheme].release())); |
| 117 DCHECK(set_protocol); | 119 DCHECK(set_protocol); |
| 118 set_protocol = aw_job_factory->SetProtocolHandler( | 120 set_protocol = aw_job_factory->SetProtocolHandler( |
| 119 url::kFileSystemScheme, | 121 url::kFileSystemScheme, |
| 120 make_scoped_ptr((*protocol_handlers)[url::kFileSystemScheme].release())); | 122 base::WrapUnique((*protocol_handlers)[url::kFileSystemScheme].release())); |
| 121 DCHECK(set_protocol); | 123 DCHECK(set_protocol); |
| 122 set_protocol = aw_job_factory->SetProtocolHandler( | 124 set_protocol = aw_job_factory->SetProtocolHandler( |
| 123 content::kChromeUIScheme, | 125 content::kChromeUIScheme, |
| 124 make_scoped_ptr( | 126 base::WrapUnique( |
| 125 (*protocol_handlers)[content::kChromeUIScheme].release())); | 127 (*protocol_handlers)[content::kChromeUIScheme].release())); |
| 126 DCHECK(set_protocol); | 128 DCHECK(set_protocol); |
| 127 set_protocol = aw_job_factory->SetProtocolHandler( | 129 set_protocol = aw_job_factory->SetProtocolHandler( |
| 128 content::kChromeDevToolsScheme, | 130 content::kChromeDevToolsScheme, |
| 129 make_scoped_ptr( | 131 base::WrapUnique( |
| 130 (*protocol_handlers)[content::kChromeDevToolsScheme].release())); | 132 (*protocol_handlers)[content::kChromeDevToolsScheme].release())); |
| 131 DCHECK(set_protocol); | 133 DCHECK(set_protocol); |
| 132 protocol_handlers->clear(); | 134 protocol_handlers->clear(); |
| 133 | 135 |
| 134 // Note that even though the content:// scheme handler is created here, | 136 // Note that even though the content:// scheme handler is created here, |
| 135 // it cannot be used by child processes until access to it is granted via | 137 // it cannot be used by child processes until access to it is granted via |
| 136 // ChildProcessSecurityPolicy::GrantScheme(). This is done in | 138 // ChildProcessSecurityPolicy::GrantScheme(). This is done in |
| 137 // AwContentBrowserClient. | 139 // AwContentBrowserClient. |
| 138 request_interceptors.push_back( | 140 request_interceptors.push_back( |
| 139 CreateAndroidContentRequestInterceptor().release()); | 141 CreateAndroidContentRequestInterceptor().release()); |
| 140 request_interceptors.push_back( | 142 request_interceptors.push_back( |
| 141 CreateAndroidAssetFileRequestInterceptor().release()); | 143 CreateAndroidAssetFileRequestInterceptor().release()); |
| 142 // The AwRequestInterceptor must come after the content and asset file job | 144 // The AwRequestInterceptor must come after the content and asset file job |
| 143 // factories. This for WebViewClassic compatibility where it was not | 145 // factories. This for WebViewClassic compatibility where it was not |
| 144 // possible to intercept resource loads to resolvable content:// and | 146 // possible to intercept resource loads to resolvable content:// and |
| 145 // file:// URIs. | 147 // file:// URIs. |
| 146 // This logical dependency is also the reason why the Content | 148 // This logical dependency is also the reason why the Content |
| 147 // URLRequestInterceptor has to be added as an interceptor rather than as a | 149 // URLRequestInterceptor has to be added as an interceptor rather than as a |
| 148 // ProtocolHandler. | 150 // ProtocolHandler. |
| 149 request_interceptors.push_back(new AwRequestInterceptor()); | 151 request_interceptors.push_back(new AwRequestInterceptor()); |
| 150 | 152 |
| 151 // The chain of responsibility will execute the handlers in reverse to the | 153 // The chain of responsibility will execute the handlers in reverse to the |
| 152 // order in which the elements of the chain are created. | 154 // order in which the elements of the chain are created. |
| 153 scoped_ptr<net::URLRequestJobFactory> job_factory(std::move(aw_job_factory)); | 155 std::unique_ptr<net::URLRequestJobFactory> job_factory( |
| 156 std::move(aw_job_factory)); |
| 154 for (content::URLRequestInterceptorScopedVector::reverse_iterator i = | 157 for (content::URLRequestInterceptorScopedVector::reverse_iterator i = |
| 155 request_interceptors.rbegin(); | 158 request_interceptors.rbegin(); |
| 156 i != request_interceptors.rend(); | 159 i != request_interceptors.rend(); |
| 157 ++i) { | 160 ++i) { |
| 158 job_factory.reset(new net::URLRequestInterceptingJobFactory( | 161 job_factory.reset(new net::URLRequestInterceptingJobFactory( |
| 159 std::move(job_factory), make_scoped_ptr(*i))); | 162 std::move(job_factory), base::WrapUnique(*i))); |
| 160 } | 163 } |
| 161 request_interceptors.weak_clear(); | 164 request_interceptors.weak_clear(); |
| 162 | 165 |
| 163 return job_factory; | 166 return job_factory; |
| 164 } | 167 } |
| 165 | 168 |
| 166 } // namespace | 169 } // namespace |
| 167 | 170 |
| 168 AwURLRequestContextGetter::AwURLRequestContextGetter( | 171 AwURLRequestContextGetter::AwURLRequestContextGetter( |
| 169 const base::FilePath& cache_path, | 172 const base::FilePath& cache_path, |
| 170 scoped_ptr<net::ProxyConfigService> config_service, | 173 std::unique_ptr<net::ProxyConfigService> config_service, |
| 171 PrefService* user_pref_service) | 174 PrefService* user_pref_service) |
| 172 : cache_path_(cache_path), | 175 : cache_path_(cache_path), |
| 173 net_log_(new net::NetLog()), | 176 net_log_(new net::NetLog()), |
| 174 proxy_config_service_(std::move(config_service)), | 177 proxy_config_service_(std::move(config_service)), |
| 175 http_user_agent_settings_(new AwHttpUserAgentSettings()) { | 178 http_user_agent_settings_(new AwHttpUserAgentSettings()) { |
| 176 // CreateSystemProxyConfigService for Android must be called on main thread. | 179 // CreateSystemProxyConfigService for Android must be called on main thread. |
| 177 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 180 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 178 | 181 |
| 179 scoped_refptr<base::SingleThreadTaskRunner> io_thread_proxy = | 182 scoped_refptr<base::SingleThreadTaskRunner> io_thread_proxy = |
| 180 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); | 183 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 194 } | 197 } |
| 195 | 198 |
| 196 AwURLRequestContextGetter::~AwURLRequestContextGetter() { | 199 AwURLRequestContextGetter::~AwURLRequestContextGetter() { |
| 197 } | 200 } |
| 198 | 201 |
| 199 void AwURLRequestContextGetter::InitializeURLRequestContext() { | 202 void AwURLRequestContextGetter::InitializeURLRequestContext() { |
| 200 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 203 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 201 DCHECK(!url_request_context_); | 204 DCHECK(!url_request_context_); |
| 202 | 205 |
| 203 net::URLRequestContextBuilder builder; | 206 net::URLRequestContextBuilder builder; |
| 204 scoped_ptr<AwNetworkDelegate> aw_network_delegate(new AwNetworkDelegate()); | 207 std::unique_ptr<AwNetworkDelegate> aw_network_delegate( |
| 208 new AwNetworkDelegate()); |
| 205 | 209 |
| 206 AwBrowserContext* browser_context = AwBrowserContext::GetDefault(); | 210 AwBrowserContext* browser_context = AwBrowserContext::GetDefault(); |
| 207 DCHECK(browser_context); | 211 DCHECK(browser_context); |
| 208 | 212 |
| 209 builder.set_network_delegate( | 213 builder.set_network_delegate( |
| 210 browser_context->GetDataReductionProxyIOData()->CreateNetworkDelegate( | 214 browser_context->GetDataReductionProxyIOData()->CreateNetworkDelegate( |
| 211 std::move(aw_network_delegate), | 215 std::move(aw_network_delegate), |
| 212 false /* No UMA is produced to track bypasses. */)); | 216 false /* No UMA is produced to track bypasses. */)); |
| 213 #if !defined(DISABLE_FTP_SUPPORT) | 217 #if !defined(DISABLE_FTP_SUPPORT) |
| 214 builder.set_ftp_enabled(false); // Android WebView does not support ftp yet. | 218 builder.set_ftp_enabled(false); // Android WebView does not support ftp yet. |
| 215 #endif | 219 #endif |
| 216 DCHECK(proxy_config_service_.get()); | 220 DCHECK(proxy_config_service_.get()); |
| 217 scoped_ptr<net::ChannelIDService> channel_id_service; | 221 std::unique_ptr<net::ChannelIDService> channel_id_service; |
| 218 if (TokenBindingManager::GetInstance()->is_enabled()) { | 222 if (TokenBindingManager::GetInstance()->is_enabled()) { |
| 219 base::FilePath channel_id_path = | 223 base::FilePath channel_id_path = |
| 220 browser_context->GetPath().Append(kChannelIDFilename); | 224 browser_context->GetPath().Append(kChannelIDFilename); |
| 221 scoped_refptr<net::SQLiteChannelIDStore> channel_id_db; | 225 scoped_refptr<net::SQLiteChannelIDStore> channel_id_db; |
| 222 channel_id_db = new net::SQLiteChannelIDStore( | 226 channel_id_db = new net::SQLiteChannelIDStore( |
| 223 channel_id_path, | 227 channel_id_path, |
| 224 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( | 228 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( |
| 225 BrowserThread::GetBlockingPool()->GetSequenceToken())); | 229 BrowserThread::GetBlockingPool()->GetSequenceToken())); |
| 226 | 230 |
| 227 channel_id_service.reset(new net::ChannelIDService( | 231 channel_id_service.reset(new net::ChannelIDService( |
| 228 new net::DefaultChannelIDStore(channel_id_db.get()), | 232 new net::DefaultChannelIDStore(channel_id_db.get()), |
| 229 base::WorkerPool::GetTaskRunner(true))); | 233 base::WorkerPool::GetTaskRunner(true))); |
| 230 } | 234 } |
| 231 | 235 |
| 232 // Android provides a local HTTP proxy that handles all the proxying. | 236 // Android provides a local HTTP proxy that handles all the proxying. |
| 233 // Create the proxy without a resolver since we rely on this local HTTP proxy. | 237 // Create the proxy without a resolver since we rely on this local HTTP proxy. |
| 234 // TODO(sgurun) is this behavior guaranteed through SDK? | 238 // TODO(sgurun) is this behavior guaranteed through SDK? |
| 235 builder.set_proxy_service(net::ProxyService::CreateWithoutProxyResolver( | 239 builder.set_proxy_service(net::ProxyService::CreateWithoutProxyResolver( |
| 236 std::move(proxy_config_service_), net_log_.get())); | 240 std::move(proxy_config_service_), net_log_.get())); |
| 237 builder.set_net_log(net_log_.get()); | 241 builder.set_net_log(net_log_.get()); |
| 238 builder.SetCookieAndChannelIdStores( | 242 builder.SetCookieAndChannelIdStores( |
| 239 make_scoped_ptr(new AwCookieStoreWrapper()), | 243 base::WrapUnique(new AwCookieStoreWrapper()), |
| 240 std::move(channel_id_service)); | 244 std::move(channel_id_service)); |
| 241 | 245 |
| 242 net::URLRequestContextBuilder::HttpCacheParams cache_params; | 246 net::URLRequestContextBuilder::HttpCacheParams cache_params; |
| 243 cache_params.type = | 247 cache_params.type = |
| 244 net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE; | 248 net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE; |
| 245 cache_params.max_size = 20 * 1024 * 1024; // 20M | 249 cache_params.max_size = 20 * 1024 * 1024; // 20M |
| 246 cache_params.path = cache_path_; | 250 cache_params.path = cache_path_; |
| 247 builder.EnableHttpCache(cache_params); | 251 builder.EnableHttpCache(cache_params); |
| 248 builder.SetFileTaskRunner( | 252 builder.SetFileTaskRunner( |
| 249 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)); | 253 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)); |
| 250 | 254 |
| 251 net::URLRequestContextBuilder::HttpNetworkSessionParams | 255 net::URLRequestContextBuilder::HttpNetworkSessionParams |
| 252 network_session_params; | 256 network_session_params; |
| 253 ApplyCmdlineOverridesToNetworkSessionParams(&network_session_params); | 257 ApplyCmdlineOverridesToNetworkSessionParams(&network_session_params); |
| 254 builder.set_http_network_session_params(network_session_params); | 258 builder.set_http_network_session_params(network_session_params); |
| 255 builder.SetSpdyAndQuicEnabled(true, false); | 259 builder.SetSpdyAndQuicEnabled(true, false); |
| 256 | 260 |
| 257 scoped_ptr<net::MappedHostResolver> host_resolver(new net::MappedHostResolver( | 261 std::unique_ptr<net::MappedHostResolver> host_resolver( |
| 258 net::HostResolver::CreateDefaultResolver(nullptr))); | 262 new net::MappedHostResolver( |
| 263 net::HostResolver::CreateDefaultResolver(nullptr))); |
| 259 ApplyCmdlineOverridesToHostResolver(host_resolver.get()); | 264 ApplyCmdlineOverridesToHostResolver(host_resolver.get()); |
| 260 builder.SetHttpAuthHandlerFactory( | 265 builder.SetHttpAuthHandlerFactory( |
| 261 CreateAuthHandlerFactory(host_resolver.get())); | 266 CreateAuthHandlerFactory(host_resolver.get())); |
| 262 builder.set_host_resolver(std::move(host_resolver)); | 267 builder.set_host_resolver(std::move(host_resolver)); |
| 263 | 268 |
| 264 url_request_context_ = builder.Build(); | 269 url_request_context_ = builder.Build(); |
| 265 | 270 |
| 266 job_factory_ = | 271 job_factory_ = |
| 267 CreateJobFactory(&protocol_handlers_, std::move(request_interceptors_)); | 272 CreateJobFactory(&protocol_handlers_, std::move(request_interceptors_)); |
| 268 job_factory_.reset(new net::URLRequestInterceptingJobFactory( | 273 job_factory_.reset(new net::URLRequestInterceptingJobFactory( |
| (...skipping 27 matching lines...) Expand all Loading... |
| 296 net::NetLog* AwURLRequestContextGetter::GetNetLog() { | 301 net::NetLog* AwURLRequestContextGetter::GetNetLog() { |
| 297 return net_log_.get(); | 302 return net_log_.get(); |
| 298 } | 303 } |
| 299 | 304 |
| 300 void AwURLRequestContextGetter::SetKeyOnIO(const std::string& key) { | 305 void AwURLRequestContextGetter::SetKeyOnIO(const std::string& key) { |
| 301 DCHECK(AwBrowserContext::GetDefault()->GetDataReductionProxyIOData()); | 306 DCHECK(AwBrowserContext::GetDefault()->GetDataReductionProxyIOData()); |
| 302 AwBrowserContext::GetDefault()->GetDataReductionProxyIOData()-> | 307 AwBrowserContext::GetDefault()->GetDataReductionProxyIOData()-> |
| 303 request_options()->SetKeyOnIO(key); | 308 request_options()->SetKeyOnIO(key); |
| 304 } | 309 } |
| 305 | 310 |
| 306 scoped_ptr<net::HttpAuthHandlerFactory> | 311 std::unique_ptr<net::HttpAuthHandlerFactory> |
| 307 AwURLRequestContextGetter::CreateAuthHandlerFactory( | 312 AwURLRequestContextGetter::CreateAuthHandlerFactory( |
| 308 net::HostResolver* resolver) { | 313 net::HostResolver* resolver) { |
| 309 DCHECK(resolver); | 314 DCHECK(resolver); |
| 310 | 315 |
| 311 // In Chrome this is configurable via the AuthSchemes policy. For WebView | 316 // In Chrome this is configurable via the AuthSchemes policy. For WebView |
| 312 // there is no interest to have it available so far. | 317 // there is no interest to have it available so far. |
| 313 std::vector<std::string> supported_schemes = {"basic", "digest", "ntlm", | 318 std::vector<std::string> supported_schemes = {"basic", "digest", "ntlm", |
| 314 "negotiate"}; | 319 "negotiate"}; |
| 315 http_auth_preferences_.reset(new net::HttpAuthPreferences(supported_schemes)); | 320 http_auth_preferences_.reset(new net::HttpAuthPreferences(supported_schemes)); |
| 316 | 321 |
| 317 UpdateServerWhitelist(); | 322 UpdateServerWhitelist(); |
| 318 UpdateAndroidAuthNegotiateAccountType(); | 323 UpdateAndroidAuthNegotiateAccountType(); |
| 319 | 324 |
| 320 return net::HttpAuthHandlerRegistryFactory::Create( | 325 return net::HttpAuthHandlerRegistryFactory::Create( |
| 321 http_auth_preferences_.get(), resolver); | 326 http_auth_preferences_.get(), resolver); |
| 322 } | 327 } |
| 323 | 328 |
| 324 void AwURLRequestContextGetter::UpdateServerWhitelist() { | 329 void AwURLRequestContextGetter::UpdateServerWhitelist() { |
| 325 http_auth_preferences_->set_server_whitelist( | 330 http_auth_preferences_->set_server_whitelist( |
| 326 auth_server_whitelist_.GetValue()); | 331 auth_server_whitelist_.GetValue()); |
| 327 } | 332 } |
| 328 | 333 |
| 329 void AwURLRequestContextGetter::UpdateAndroidAuthNegotiateAccountType() { | 334 void AwURLRequestContextGetter::UpdateAndroidAuthNegotiateAccountType() { |
| 330 http_auth_preferences_->set_auth_android_negotiate_account_type( | 335 http_auth_preferences_->set_auth_android_negotiate_account_type( |
| 331 auth_android_negotiate_account_type_.GetValue()); | 336 auth_android_negotiate_account_type_.GetValue()); |
| 332 } | 337 } |
| 333 | 338 |
| 334 } // namespace android_webview | 339 } // namespace android_webview |
| OLD | NEW |