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

Unified Diff: components/history/core/browser/visitsegment_database.h

Issue 1924773002: TopSites: filter out non-WebSafe URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@topsites_cleanup
Patch Set: comment Created 4 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/history/core/browser/visitsegment_database.h
diff --git a/components/history/core/browser/visitsegment_database.h b/components/history/core/browser/visitsegment_database.h
index c5ca21e6ab31c94e0ced37bb6d76689417c6f580..6f078678b11d871c1d332384dd3cdedc555c1d2a 100644
--- a/components/history/core/browser/visitsegment_database.h
+++ b/components/history/core/browser/visitsegment_database.h
@@ -7,6 +7,7 @@
#include <memory>
+#include "base/callback_forward.h"
#include "base/macros.h"
#include "components/history/core/browser/history_types.h"
@@ -52,11 +53,13 @@ class VisitSegmentDatabase {
bool IncreaseSegmentVisitCount(SegmentID segment_id, base::Time ts,
int amount);
- // Computes the segment usage since |from_time|.
+ // Computes the segment usage since |from_time|. If |url_filter| is non-null,
+ // then only URLs for which it returns true will be included.
// Returns the highest-scored segments up to |max_result_count|.
std::vector<std::unique_ptr<PageUsageData>> QuerySegmentUsage(
base::Time from_time,
- int max_result_count);
+ int max_result_count,
+ const base::Callback<bool(const GURL&)>& url_filter);
// Delete all the segment usage data which is older than the provided time
// stamp.

Powered by Google App Engine
This is Rietveld 408576698