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

Unified Diff: components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h

Issue 2691423006: Introduce the ThrottleManager (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: components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h
diff --git a/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h b/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h
index 2fc7917078c317e52381175990f1d4f19a0c59f1..23faf794afac5e3fd7cb4b842783c88ac7d73bab 100644
--- a/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h
+++ b/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h
@@ -40,7 +40,8 @@ class ActivationStateComputingNavigationThrottle
static std::unique_ptr<ActivationStateComputingNavigationThrottle>
CreateForSubframe(content::NavigationHandle* navigation_handle,
VerifiedRuleset::Handle* ruleset_handle,
- const ActivationState& parent_activation_state);
+ const ActivationState& parent_activation_state,
+ base::OnceClosure first_disallowed_load_callback);
engedy 2017/03/10 17:36:20 optional nit: On second read, it seems a bit weird
Charlie Harrison 2017/03/14 23:18:31 Sure. I added a setter on the ADSF.
~ActivationStateComputingNavigationThrottle() override;
@@ -50,7 +51,8 @@ class ActivationStateComputingNavigationThrottle
// this object will never delay the navigation.
void NotifyPageActivationWithRuleset(
VerifiedRuleset::Handle* ruleset_handle,
- const ActivationState& page_activation_state);
+ const ActivationState& page_activation_state,
+ base::OnceClosure first_disallowed_load_callback);
// content::NavigationThrottle:
content::NavigationThrottle::ThrottleCheckResult WillProcessResponse()
@@ -74,7 +76,8 @@ class ActivationStateComputingNavigationThrottle
ActivationStateComputingNavigationThrottle(
content::NavigationHandle* navigation_handle,
const base::Optional<ActivationState> parent_activation_state,
- VerifiedRuleset::Handle* ruleset_handle);
+ VerifiedRuleset::Handle* ruleset_handle,
+ base::OnceClosure first_disallowed_load_callback);
// These members are optional to allow DCHECKing their existence at certain
// points in the navigation flow.
@@ -87,6 +90,8 @@ class ActivationStateComputingNavigationThrottle
// nullptr until NotifyPageActivationWithRuleset is called.
VerifiedRuleset::Handle* ruleset_handle_;
+ base::OnceClosure first_disallowed_load_callback_;
+
base::WeakPtrFactory<ActivationStateComputingNavigationThrottle>
weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698