Remove LOAD_SUB_FRAME load flag.
It's not used in net, and net/ knowing about frames is a layering
violation. External consumers that depended on it now use the
corresponding ResourceType instead.
BUG=426442
Review URL: https://codereview.chromium.org/1134733004
Cr-Commit-Position: refs/heads/master@{#330370}
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 9348cef..4953a72 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -377,9 +377,13 @@
// 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,