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

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

Issue 2600253002: Aggregate DocumentSubresourceFilter counters on page level. (Closed)
Patch Set: Created 4 years 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..82928df2604c9727b12fc500baa71a10d028ff2d 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 page_statistics_;
engedy 2016/12/28 09:36:02 nit: How about calling this |aggregated_document_s
pkalinnikov 2016/12/28 13:43:22 Done.
DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory);
};

Powered by Google App Engine
This is Rietveld 408576698