| 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
| 6 | 6 |
| 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 ResourceDispatcherHostLoginDelegate* | 646 ResourceDispatcherHostLoginDelegate* |
| 647 ResourceDispatcherHostImpl::CreateLoginDelegate( | 647 ResourceDispatcherHostImpl::CreateLoginDelegate( |
| 648 ResourceLoader* loader, | 648 ResourceLoader* loader, |
| 649 net::AuthChallengeInfo* auth_info) { | 649 net::AuthChallengeInfo* auth_info) { |
| 650 if (!delegate_) | 650 if (!delegate_) |
| 651 return NULL; | 651 return NULL; |
| 652 | 652 |
| 653 return delegate_->CreateLoginDelegate(auth_info, loader->request()); | 653 return delegate_->CreateLoginDelegate(auth_info, loader->request()); |
| 654 } | 654 } |
| 655 | 655 |
| 656 bool ResourceDispatcherHostImpl::AcceptAuthRequest( | |
| 657 ResourceLoader* loader, | |
| 658 net::AuthChallengeInfo* auth_info) { | |
| 659 if (delegate_ && !delegate_->AcceptAuthRequest(loader->request(), auth_info)) | |
| 660 return false; | |
| 661 | |
| 662 return true; | |
| 663 } | |
| 664 | |
| 665 bool ResourceDispatcherHostImpl::AcceptSSLClientCertificateRequest( | |
| 666 ResourceLoader* loader, | |
| 667 net::SSLCertRequestInfo* cert_info) { | |
| 668 if (delegate_ && !delegate_->AcceptSSLClientCertificateRequest( | |
| 669 loader->request(), cert_info)) { | |
| 670 return false; | |
| 671 } | |
| 672 | |
| 673 return true; | |
| 674 } | |
| 675 | |
| 676 bool ResourceDispatcherHostImpl::HandleExternalProtocol(ResourceLoader* loader, | 656 bool ResourceDispatcherHostImpl::HandleExternalProtocol(ResourceLoader* loader, |
| 677 const GURL& url) { | 657 const GURL& url) { |
| 678 if (!delegate_) | 658 if (!delegate_) |
| 679 return false; | 659 return false; |
| 680 | 660 |
| 681 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); | 661 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); |
| 682 | 662 |
| 683 if (!ResourceType::IsFrame(info->GetResourceType())) | 663 if (!ResourceType::IsFrame(info->GetResourceType())) |
| 684 return false; | 664 return false; |
| 685 | 665 |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1974 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) | 1954 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) |
| 1975 && !policy->CanReadRawCookies(child_id)) { | 1955 && !policy->CanReadRawCookies(child_id)) { |
| 1976 VLOG(1) << "Denied unauthorized request for raw headers"; | 1956 VLOG(1) << "Denied unauthorized request for raw headers"; |
| 1977 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; | 1957 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; |
| 1978 } | 1958 } |
| 1979 | 1959 |
| 1980 return load_flags; | 1960 return load_flags; |
| 1981 } | 1961 } |
| 1982 | 1962 |
| 1983 } // namespace content | 1963 } // namespace content |
| OLD | NEW |