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

Unified Diff: components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.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/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 f48d6c2e417b20d3969218f525c9c03b0caa3c0b..5998249bb13421472457d63088c98ea66026a383 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
@@ -2,15 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_FRAME_ACTIVATION_NAVIGATION_THROTTLE_H_
-#define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_FRAME_ACTIVATION_NAVIGATION_THROTTLE_H_
+#ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_ACTIVATION_STATE_COMPUTING_NAVIGATION_THROTTLE_H_
+#define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_ACTIVATION_STATE_COMPUTING_NAVIGATION_THROTTLE_H_
#include <memory>
+#include <utility>
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/optional.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/navigation_throttle.h"
@@ -48,9 +50,9 @@ class ActivationStateComputingNavigationThrottle
// Must be called at most once before WillProcessResponse is called on this
// throttle. If it is never called, or it is called with a DISABLED state,
// this object will never delay the navigation.
- void NotifyPageActivationWithRuleset(
- VerifiedRuleset::Handle* ruleset_handle,
- const ActivationState& page_activation_state);
+ void NotifyPageActivationWithRuleset(VerifiedRuleset::Handle* ruleset_handle,
+ const ActivationState& activation_state,
+ ActivationDecision activation_decision);
// content::NavigationThrottle:
content::NavigationThrottle::ThrottleCheckResult WillProcessResponse()
@@ -66,6 +68,9 @@ class ActivationStateComputingNavigationThrottle
AsyncDocumentSubresourceFilter* filter() { return async_filter_.get(); }
+ // Must only be called if this is a main frame throttle.
+ ActivationDecision GetPageActivationDecision();
+
void WillSendActivationToRenderer();
private:
@@ -83,6 +88,9 @@ class ActivationStateComputingNavigationThrottle
// Optional to allow for DCHECKing.
base::Optional<ActivationState> parent_activation_state_;
+ // Will only be set on main frame throttles.
+ ActivationDecision page_activation_decision_ = ActivationDecision::UNKNOWN;
+
std::unique_ptr<AsyncDocumentSubresourceFilter> async_filter_;
// Must outlive this class. For main frame navigations, this member will be
@@ -103,4 +111,4 @@ class ActivationStateComputingNavigationThrottle
} // namespace subresource_filter
-#endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_FRAME_ACTIVATION_NAVIGATION_THROTTLE_H_
+#endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_ACTIVATION_STATE_COMPUTING_NAVIGATION_THROTTLE_H_

Powered by Google App Engine
This is Rietveld 408576698