| 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 "content/browser/loader/resource_loader.h" | 5 #include "content/browser/loader/resource_loader.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 DCHECK(request_->status().is_success()); | 260 DCHECK(request_->status().is_success()); |
| 261 | 261 |
| 262 ResourceRequestInfoImpl* info = GetRequestInfo(); | 262 ResourceRequestInfoImpl* info = GetRequestInfo(); |
| 263 | 263 |
| 264 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanRequestURL( | 264 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanRequestURL( |
| 265 info->GetChildID(), redirect_info.new_url)) { | 265 info->GetChildID(), redirect_info.new_url)) { |
| 266 DVLOG(1) << "Denied unauthorized request for " | 266 DVLOG(1) << "Denied unauthorized request for " |
| 267 << redirect_info.new_url.possibly_invalid_spec(); | 267 << redirect_info.new_url.possibly_invalid_spec(); |
| 268 | 268 |
| 269 // Tell the renderer that this request was disallowed. | 269 // Tell the renderer that this request was disallowed. |
| 270 Cancel(); | 270 CancelWithError(net::ERR_INVALID_URL); |
| 271 return; | 271 return; |
| 272 } | 272 } |
| 273 | 273 |
| 274 delegate_->DidReceiveRedirect(this, redirect_info.new_url); | 274 delegate_->DidReceiveRedirect(this, redirect_info.new_url); |
| 275 | 275 |
| 276 if (delegate_->HandleExternalProtocol(this, redirect_info.new_url)) { | 276 if (delegate_->HandleExternalProtocol(this, redirect_info.new_url)) { |
| 277 // The request is complete so we can remove it. | 277 // The request is complete so we can remove it. |
| 278 CancelAndIgnore(); | 278 CancelAndIgnore(); |
| 279 return; | 279 return; |
| 280 } | 280 } |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 case net::URLRequestStatus::FAILED: | 740 case net::URLRequestStatus::FAILED: |
| 741 status = STATUS_UNDEFINED; | 741 status = STATUS_UNDEFINED; |
| 742 break; | 742 break; |
| 743 } | 743 } |
| 744 | 744 |
| 745 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); | 745 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); |
| 746 } | 746 } |
| 747 } | 747 } |
| 748 | 748 |
| 749 } // namespace content | 749 } // namespace content |
| OLD | NEW |