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

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

Issue 2841933003: [subresource_filter] Remove some state from the driver factory (Closed)
Patch Set: no more dep branch Created 3 years, 8 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/content_subresource_filter_throttle_manager.h
diff --git a/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h
index 446296538270edd2d17cbcb930676fe1ef1962b3..846c822e815df4c97c883bfddc523cab95d7fd20 100644
--- a/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h
+++ b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "components/subresource_filter/content/browser/verified_ruleset_dealer.h"
+#include "components/subresource_filter/core/common/activation_decision.h"
#include "components/subresource_filter/core/common/activation_state.h"
#include "content/public/browser/web_contents_observer.h"
@@ -78,7 +79,8 @@ class ContentSubresourceFilterThrottleManager
// page load.
void NotifyPageActivationComputed(
content::NavigationHandle* navigation_handle,
- const ActivationState& activation_state);
+ const ActivationState& activation_state,
+ ActivationDecision activation_decision);
// This method inspects |navigation_handle| and attaches navigation throttles
// appropriately, based on the current state of frame activation.
@@ -101,6 +103,11 @@ class ContentSubresourceFilterThrottleManager
return ruleset_handle_.get();
}
+ // Returns the |ActivationDecision| for the current main frame document.
+ ActivationDecision GetActivationDecisionForLastCommittedPageLoad() const {
+ return activation_decision_;
+ }
+
protected:
// content::WebContentsObserver:
void RenderFrameDeleted(content::RenderFrameHost* frame_host) override;
@@ -160,6 +167,9 @@ class ContentSubresourceFilterThrottleManager
// should only be called at most once per main frame load.
bool current_committed_load_has_notified_disallowed_load_ = false;
+ // The activation decision for the last committed main frame navigation.
+ ActivationDecision activation_decision_ = ActivationDecision::UNKNOWN;
+
// These members outlive this class.
VerifiedRulesetDealer::Handle* dealer_handle_;
Delegate* delegate_;

Powered by Google App Engine
This is Rietveld 408576698