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

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

Issue 1908443003: Set site engagement timestamps to privacy-respectful values when history is cleared. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: 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/history_backend.h
diff --git a/components/history/core/browser/history_backend.h b/components/history/core/browser/history_backend.h
index 573a4010188716cfd4d0fb9c099330fae488fafd..dc971434b0de92af79b062b84a57774fdd40c0d2 100644
--- a/components/history/core/browser/history_backend.h
+++ b/components/history/core/browser/history_backend.h
@@ -213,11 +213,12 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
// generating internal metrics.
TopHostsList TopHosts(size_t num_hosts) const;
- // Gets the counts of URLs that belong to |origins| in the history database.
- // Origins that are not in the history database will be in the map with a
- // count of 0.
+ // Gets the counts and last last time of URLs that belong to |origins| in the
+ // history database. Origins that are not in the history database will be in
+ // the map with a count and time of 0.
// Returns an empty map if db_ is not initialized.
- OriginCountMap GetCountsForOrigins(const std::set<GURL>& origins) const;
+ OriginCountAndLastVisitMap GetCountsAndLastVisitForOrigins(
+ const std::set<GURL>& origins) const;
// Returns, for the given URL, a 0-based index into the list produced by
// TopHosts(), corresponding to that URL's host. If TopHosts() has not
@@ -557,7 +558,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, TopHosts_IgnoreUnusualURLs);
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, HostRankIfAvailable);
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RecordTopHostsMetrics);
- FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetCountsForOrigins);
+ FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetCountsAndLastVisitForOrigins);
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, UpdateVisitDuration);
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, ExpireHistoryForTimes);
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, DeleteFTSIndexDatabases);
« no previous file with comments | « chrome/browser/engagement/site_engagement_service_unittest.cc ('k') | components/history/core/browser/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698