| 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/renderer_host/aw_resource_dispatcher_host_dele
gate.h" | 5 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "android_webview/browser/aw_contents_io_thread_client.h" | 9 #include "android_webview/browser/aw_contents_io_thread_client.h" |
| 10 #include "android_webview/browser/aw_login_delegate.h" | 10 #include "android_webview/browser/aw_login_delegate.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 // retrying the same request, even if it is with a GET. | 283 // retrying the same request, even if it is with a GET. |
| 284 if ("GET" == request->method() && io_client) { | 284 if ("GET" == request->method() && io_client) { |
| 285 io_client->NewDownload(url, | 285 io_client->NewDownload(url, |
| 286 user_agent, | 286 user_agent, |
| 287 content_disposition, | 287 content_disposition, |
| 288 mime_type, | 288 mime_type, |
| 289 content_length); | 289 content_length); |
| 290 } | 290 } |
| 291 } | 291 } |
| 292 | 292 |
| 293 bool AwResourceDispatcherHostDelegate::AcceptAuthRequest( | |
| 294 net::URLRequest* request, | |
| 295 net::AuthChallengeInfo* auth_info) { | |
| 296 return true; | |
| 297 } | |
| 298 | |
| 299 bool AwResourceDispatcherHostDelegate::AcceptSSLClientCertificateRequest( | |
| 300 net::URLRequest* request, | |
| 301 net::SSLCertRequestInfo* cert_info) { | |
| 302 // WebView does not support client certificate selection, however it does | |
| 303 // send a no-certificate response to the server to allow it decide how to | |
| 304 // proceed. The base class returns false here, which causes the entire | |
| 305 // resource request to be abort. We don't want that, so we must return true | |
| 306 // here (and subsequently complete the request in | |
| 307 // AwContentBrowserClient::SelectClientCertificate) to get the intended | |
| 308 // behavior. | |
| 309 return true; | |
| 310 } | |
| 311 | |
| 312 content::ResourceDispatcherHostLoginDelegate* | 293 content::ResourceDispatcherHostLoginDelegate* |
| 313 AwResourceDispatcherHostDelegate::CreateLoginDelegate( | 294 AwResourceDispatcherHostDelegate::CreateLoginDelegate( |
| 314 net::AuthChallengeInfo* auth_info, | 295 net::AuthChallengeInfo* auth_info, |
| 315 net::URLRequest* request) { | 296 net::URLRequest* request) { |
| 316 return new AwLoginDelegate(auth_info, request); | 297 return new AwLoginDelegate(auth_info, request); |
| 317 } | 298 } |
| 318 | 299 |
| 319 bool AwResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL& url, | 300 bool AwResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL& url, |
| 320 int child_id, | 301 int child_id, |
| 321 int route_id) { | 302 int route_id) { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 net::HttpRequestHeaders headers; | 418 net::HttpRequestHeaders headers; |
| 438 headers.AddHeadersFromString(extra_headers); | 419 headers.AddHeadersFromString(extra_headers); |
| 439 for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext(); ) { | 420 for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext(); ) { |
| 440 request->SetExtraRequestHeaderByName(it.name(), it.value(), false); | 421 request->SetExtraRequestHeaderByName(it.name(), it.value(), false); |
| 441 } | 422 } |
| 442 } | 423 } |
| 443 } | 424 } |
| 444 } | 425 } |
| 445 | 426 |
| 446 } // namespace android_webview | 427 } // namespace android_webview |
| OLD | NEW |