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

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

Issue 2600253002: Aggregate DocumentSubresourceFilter counters on page level. (Closed)
Patch Set: rebase Created 3 years, 11 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_driver_factory.h
diff --git a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h
index e5852bdb1ca5ea45a5b7078429f60cf660bcc698..7b6e20d22ed5203500bcb818be6fafd22a393695 100644
--- a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h
+++ b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h
@@ -15,6 +15,7 @@
#include "base/supports_user_data.h"
#include "base/time/time.h"
#include "components/safe_browsing_db/util.h"
+#include "components/subresource_filter/content/common/document_load_statistics.h"
#include "content/public/browser/web_contents_observer.h"
#include "url/gurl.h"
@@ -92,8 +93,7 @@ class ContentSubresourceFilterDriverFactory
void OnFirstSubresourceLoadDisallowed();
- void OnDocumentLoadStatistics(base::TimeDelta evaluation_total_wall_duration,
- base::TimeDelta evaluation_total_cpu_duration);
+ void OnDocumentLoadStatistics(const DocumentLoadStatistics& statistics);
bool IsWhitelisted(const GURL& url) const;
@@ -141,11 +141,9 @@ class ContentSubresourceFilterDriverFactory
URLToActivationListsMap activation_list_matches_;
- // Total time spent in DocumentSubresourceFilter::allowLoad() calls,
- // aggregated across all frames, evaluating subresource loads for the current
- // page load.
- base::TimeDelta evaluation_total_wall_duration_;
- base::TimeDelta evaluation_total_cpu_duration_;
+ // Statistics about subresource loads, aggregated across all frames of the
+ // current page.
+ DocumentLoadStatistics aggregated_document_statistics_;
DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory);
};

Powered by Google App Engine
This is Rietveld 408576698