Clean up PingLoad::processContentExtensionRulesForLoad()
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Aug 2017 18:27:04 +0000 (18:27 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Aug 2017 18:27:04 +0000 (18:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175834

Reviewed by Alex Christensen.

* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::willPerformHTTPRedirection):
(WebKit::PingLoad::processContentExtensionRulesForLoad):
* NetworkProcess/PingLoad.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221029 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/PingLoad.cpp
Source/WebKit/NetworkProcess/PingLoad.h

index 5459a48..1339606 100644 (file)
@@ -1,3 +1,15 @@
+2017-08-22  Chris Dumez  <cdumez@apple.com>
+
+        Clean up PingLoad::processContentExtensionRulesForLoad()
+        https://bugs.webkit.org/show_bug.cgi?id=175834
+
+        Reviewed by Alex Christensen.
+
+        * NetworkProcess/PingLoad.cpp:
+        (WebKit::PingLoad::willPerformHTTPRedirection):
+        (WebKit::PingLoad::processContentExtensionRulesForLoad):
+        * NetworkProcess/PingLoad.h:
+
 2017-08-22  Alex Christensen  <achristensen@webkit.org>
 
         Remove ChromeClient::scrollbarsModeDidChange
index db68a08..0942e80 100644 (file)
@@ -111,7 +111,7 @@ void PingLoad::willPerformHTTPRedirection(ResourceResponse&& redirectResponse, R
     }
 
 #if ENABLE(CONTENT_EXTENSIONS)
-    if (processContentExtensionRulesForLoad(request)) {
+    if (processContentExtensionRulesForLoad(request).blockedLoad) {
         RELEASE_LOG_IF_ALLOWED("willPerformHTTPRedirection - Redirect was blocked by content extensions");
         m_lastRedirectionRequest = request;
         completionHandler({ });
@@ -321,12 +321,11 @@ ContentExtensions::ContentExtensionsBackend& PingLoad::contentExtensionsBackend(
     return *m_contentExtensionsBackend;
 }
 
-// Returns true if we should block the load.
-bool PingLoad::processContentExtensionRulesForLoad(ResourceRequest& request)
+ContentExtensions::BlockedStatus PingLoad::processContentExtensionRulesForLoad(ResourceRequest& request)
 {
     auto status = contentExtensionsBackend().processContentExtensionRulesForPingLoad(request.url(), m_parameters.mainDocumentURL);
     applyBlockedStatusToRequest(status, request);
-    return status.blockedLoad;
+    return status;
 }
 
 #endif // ENABLE(CONTENT_EXTENSIONS)
index e993d16..cabd2b0 100644 (file)
@@ -71,7 +71,7 @@ private:
 
 #if ENABLE(CONTENT_EXTENSIONS)
     WebCore::ContentExtensions::ContentExtensionsBackend& contentExtensionsBackend();
-    bool processContentExtensionRulesForLoad(WebCore::ResourceRequest&);
+    WebCore::ContentExtensions::BlockedStatus processContentExtensionRulesForLoad(WebCore::ResourceRequest&);
 #endif
 
     WebCore::SecurityOrigin& securityOrigin() const;