Index: chrome/browser/history/visit_database.h |
diff --git a/chrome/browser/history/visit_database.h b/chrome/browser/history/visit_database.h |
index 18efc3c9ca6c2e5c71036e40a70d2f80aed0ee78..166af98a68817394606e3412be2590cbf19f640a 100644 |
--- a/chrome/browser/history/visit_database.h |
+++ b/chrome/browser/history/visit_database.h |
@@ -63,6 +63,15 @@ class VisitDatabase { |
// Returns true on success (although there may still be no matches). |
bool GetIndexedVisitsForURL(URLID url_id, VisitVector* visits); |
+ // Fills in the given vector with the visits for the given page ID which |
+ // match the set of options passed, sorted in ascending order of date. |
+ // |
+ // Returns true if there are more results available, i.e. if the number of |
+ // results was restricted by |options.max_count|. |
+ bool GetVisitsForURLWithOptions(URLID url_id, |
+ const QueryOptions& options, |
+ VisitVector* visits); |
+ |
// Fills the vector with all visits with times in the given list. |
// |
// The results will be in no particular order. Also, no duplicate |
@@ -202,6 +211,12 @@ class VisitDatabase { |
// hasn't happened yet. |
static bool FillVisitVector(sql::Statement& statement, VisitVector* visits); |
+ // Convenience to fill a VisitVector while respecting the set of options. |
+ // Assumes that statement.step() hasn't happened yet. |
+ static bool FillVisitVectorWithOptions(sql::Statement& statement, |
+ const QueryOptions& options, |
+ VisitVector* visits); |
+ |
// Called by the derived classes to migrate the older visits table which |
// don't have visit_duration column yet. |
bool MigrateVisitsWithoutDuration(); |
@@ -216,6 +231,6 @@ class VisitDatabase { |
" id,url,visit_time,from_visit,transition,segment_id,is_indexed," \ |
"visit_duration " |
-} // history |
+} // namespace history |
#endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_ |