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

Unified Diff: chrome/browser/history/visit_database.h

Issue 9358073: First version of the time slicing on the urls. Not ready for review yet. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added relative time to time slicing Created 8 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
« no previous file with comments | « chrome/browser/history/time_filter_unittest.cc ('k') | chrome/browser/history/visit_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/visit_database.h
diff --git a/chrome/browser/history/visit_database.h b/chrome/browser/history/visit_database.h
index 3eca17d7a1fa2720034fa92eb29529ecb89e1f06..ce0f8afef301a53eca30f46a845adeae9e795ef5 100644
--- a/chrome/browser/history/visit_database.h
+++ b/chrome/browser/history/visit_database.h
@@ -16,6 +16,8 @@ class Statement;
namespace history {
+class TimeFilter;
+
// A visit database is one which stores visits for URLs, that is, times and
// linking information. A visit database must also be a URLDatabase, as this
// modifies tables used by URLs directly and could be thought of as inheriting
@@ -73,6 +75,17 @@ class VisitDatabase {
bool GetAllVisitsInRange(base::Time begin_time, base::Time end_time,
int max_results, VisitVector* visits);
+ // Fills all visits in the time ranges embedded in |time_filter| to the given
+ // vector.
+ //
+ // If |max_results| is non-zero, up to that many results will be returned. If
+ // there are more results than that, the oldest ones will be returned. (This
+ // is used for history expiration.)
+ //
+ // The results will be in increasing order of date.
+ bool GetAllVisitsDuringTimes(const TimeFilter& time_filter,
+ int max_results, VisitVector* visits);
+
// Fills all visits with specified transition in the time range [begin, end)
// to the given vector. Either time can be is_null(), in which case the times
// in that direction are unbounded.
@@ -103,6 +116,20 @@ class VisitDatabase {
int max_count,
VisitVector* visits);
+ // Fills all visits in the given time ranges into the given vector that should
+ // be user-visible, which excludes things like redirects and subframes. The
+ // begin time is inclusive, the end time is exclusive.
+ //
+ // Up to |max_count| visits will be returned. If there are more visits than
+ // that, the most recent |max_count| will be returned. If 0, all visits in the
+ // range will be computed.
+ //
+ // Only one visit for each URL will be returned, and it will be the most
+ // recent one in the time range.
+ void GetVisibleVisitsDuringTimes(const TimeFilter& time_filter,
+ int max_count,
+ VisitVector* visits);
+
// Returns the visit ID for the most recent visit of the given URL ID, or 0
// if there is no visit for the URL.
//
« no previous file with comments | « chrome/browser/history/time_filter_unittest.cc ('k') | chrome/browser/history/visit_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698