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

Unified Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 1134733004: Remove LOAD_SUB_FRAME load flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to atwilson's comments Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/net/connect_interceptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_network_delegate.cc
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 9348cef93a3ee3ca9c641bd4eb4e504d006de7cd..4953a723c0be1b94cbeacbbb1f9434a0b6732ac4 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -377,9 +377,13 @@ int ChromeNetworkDelegate::OnBeforeURLRequest(
// TODO(joaodasilva): This prevents extensions from seeing URLs that are
// blocked. However, an extension might redirect the request to another URL,
// which is not blocked.
+
+ const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
int error = net::ERR_BLOCKED_BY_ADMINISTRATOR;
- if (url_blacklist_manager_ &&
- url_blacklist_manager_->IsRequestBlocked(*request, &error)) {
+ if (info && content::IsResourceTypeFrame(info->GetResourceType()) &&
+ url_blacklist_manager_ &&
+ url_blacklist_manager_->ShouldBlockRequestForFrame(
+ request->url(), &error)) {
// URL access blocked by policy.
request->net_log().AddEvent(
net::NetLog::TYPE_CHROME_POLICY_ABORTED_REQUEST,
« no previous file with comments | « no previous file | chrome/browser/net/connect_interceptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698