Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(654)

Side by Side Diff: content/browser/loader/resource_loader.cc

Issue 1862513003: Remove NPAPI from browser and utility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 bool* defer) { 254 bool* defer) {
255 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("loading"), 255 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("loading"),
256 "ResourceLoader::OnReceivedRedirect"); 256 "ResourceLoader::OnReceivedRedirect");
257 DCHECK_EQ(request_.get(), unused); 257 DCHECK_EQ(request_.get(), unused);
258 258
259 DVLOG(1) << "OnReceivedRedirect: " << request_->url().spec(); 259 DVLOG(1) << "OnReceivedRedirect: " << request_->url().spec();
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 (info->GetProcessType() != PROCESS_TYPE_PLUGIN && 264 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanRequestURL(
265 !ChildProcessSecurityPolicyImpl::GetInstance()-> 265 info->GetChildID(), redirect_info.new_url)) {
266 CanRequestURL(info->GetChildID(), redirect_info.new_url)) {
267 DVLOG(1) << "Denied unauthorized request for " 266 DVLOG(1) << "Denied unauthorized request for "
268 << redirect_info.new_url.possibly_invalid_spec(); 267 << redirect_info.new_url.possibly_invalid_spec();
269 268
270 // Tell the renderer that this request was disallowed. 269 // Tell the renderer that this request was disallowed.
271 Cancel(); 270 Cancel();
272 return; 271 return;
273 } 272 }
274 273
275 delegate_->DidReceiveRedirect(this, redirect_info.new_url); 274 delegate_->DidReceiveRedirect(this, redirect_info.new_url);
276 275
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 case net::URLRequestStatus::FAILED: 740 case net::URLRequestStatus::FAILED:
742 status = STATUS_UNDEFINED; 741 status = STATUS_UNDEFINED;
743 break; 742 break;
744 } 743 }
745 744
746 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); 745 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX);
747 } 746 }
748 } 747 }
749 748
750 } // namespace content 749 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/loader/resource_request_info_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698