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

Unified Diff: components/subresource_filter/content/renderer/subresource_filter_agent.h

Issue 2669833004: Refactor subresource filter activation to support PlzNavigate cleanly. (Closed)
Patch Set: Rebase. Created 3 years, 10 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/renderer/subresource_filter_agent.h
diff --git a/components/subresource_filter/content/renderer/subresource_filter_agent.h b/components/subresource_filter/content/renderer/subresource_filter_agent.h
index 75533a0d2ecb0772bbbb3545bbc253dae39a0a72..fc33ffb46d4368ec6d4443de984513b923153a95 100644
--- a/components/subresource_filter/content/renderer/subresource_filter_agent.h
+++ b/components/subresource_filter/content/renderer/subresource_filter_agent.h
@@ -62,26 +62,25 @@ class SubresourceFilterAgent
const DocumentLoadStatistics& statistics);
private:
- void OnActivateForProvisionalLoad(ActivationLevel activation_level,
- const GURL& url,
- bool measure_performance);
+ void OnActivateForNextCommittedLoad(ActivationLevel activation_level,
+ bool measure_performance);
void RecordHistogramsOnLoadCommitted();
void RecordHistogramsOnLoadFinished();
// content::RenderFrameObserver:
void OnDestruct() override;
- void DidStartProvisionalLoad(blink::WebDataSource* data_source) override;
void DidCommitProvisionalLoad(bool is_new_navigation,
bool is_same_page_navigation) override;
+ void DidFailProvisionalLoad(const blink::WebURLError& error) override;
void DidFinishLoad() override;
bool OnMessageReceived(const IPC::Message& message) override;
// Owned by the ChromeContentRendererClient and outlives us.
UnverifiedRulesetDealer* ruleset_dealer_;
- ActivationLevel activation_level_for_provisional_load_;
- GURL url_for_provisional_load_;
- bool measure_performance_ = false;
+ ActivationLevel activation_level_for_next_commit_ = ActivationLevel::DISABLED;
+ bool measure_performance_for_next_commit_ = false;
+
base::WeakPtr<DocumentSubresourceFilter> filter_for_last_committed_load_;
DISALLOW_COPY_AND_ASSIGN(SubresourceFilterAgent);

Powered by Google App Engine
This is Rietveld 408576698