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

Unified Diff: third_party/WebKit/Source/core/loader/SubresourceFilter.cpp

Issue 2724903004: Add ELEMENT_TYPE_WEBSOCKET to subresource filter (Closed)
Patch Set: rebase Created 3 years, 9 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
Index: third_party/WebKit/Source/core/loader/SubresourceFilter.cpp
diff --git a/third_party/WebKit/Source/core/loader/SubresourceFilter.cpp b/third_party/WebKit/Source/core/loader/SubresourceFilter.cpp
index c00cc19df25abfa8612cdf8db142cf06a25c4802..056fb9a9d309838b5b812977aba43e2dc8dd81de 100644
--- a/third_party/WebKit/Source/core/loader/SubresourceFilter.cpp
+++ b/third_party/WebKit/Source/core/loader/SubresourceFilter.cpp
@@ -41,14 +41,8 @@ bool SubresourceFilter::allowLoad(
}
bool SubresourceFilter::allowWebSocketConnection(const KURL& url) {
- // TODO(csharrison): Should probably have a new API for this in
- // WebDocumentSubresourceFilter rather than sending subresource context.
- // Alternatively, could augment the filter API so that we send a
- // WebDocumentSubresourceFilterResourceType that matches
- // subresource_filter::proto::ElementType.
WebDocumentSubresourceFilter::LoadPolicy loadPolicy =
- m_subresourceFilter->getLoadPolicy(
- url, WebURLRequest::RequestContextSubresource);
+ m_subresourceFilter->getLoadPolicyForWebSocketConnect(url);
// Post a task to notify this load to avoid unduly blocking the worker
// thread. Note that this unconditionally calls reportLoad unlike allowLoad,

Powered by Google App Engine
This is Rietveld 408576698