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

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

Issue 113591: Fix Acid3 Test 48: LINKTEST, Chromium side.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Made waiting more bearable. Created 11 years, 6 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/visit_database.h ('k') | chrome/browser/profile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/visit_database.cc
===================================================================
--- chrome/browser/history/visit_database.cc (revision 19822)
+++ chrome/browser/history/visit_database.cc (working copy)
@@ -213,6 +213,35 @@
FillVisitVector(*statement, visits);
}
+void VisitDatabase::GetVisitsInRangeForTransition(
+ Time begin_time,
+ Time end_time,
+ int max_results,
+ PageTransition::Type transition,
+ VisitVector* visits) {
+ DCHECK(visits);
+ visits->clear();
+
+ SQLITE_UNIQUE_STATEMENT(statement, GetStatementCache(),
+ "SELECT" HISTORY_VISIT_ROW_FIELDS "FROM visits "
+ "WHERE visit_time >= ? AND visit_time < ? "
+ "AND (transition & ?) == ?"
+ "ORDER BY visit_time LIMIT ?");
+ if (!statement.is_valid())
+ return;
+
+ // See GetVisibleVisitsInRange for more info on how these times are bound.
+ int64 end = end_time.ToInternalValue();
+ statement->bind_int64(0, begin_time.ToInternalValue());
+ statement->bind_int64(1, end ? end : std::numeric_limits<int64>::max());
+ statement->bind_int(2, PageTransition::CORE_MASK);
+ statement->bind_int(3, transition);
+ statement->bind_int64(4,
+ max_results ? max_results : std::numeric_limits<int64>::max());
+
+ FillVisitVector(*statement, visits);
+}
+
void VisitDatabase::GetVisibleVisitsInRange(Time begin_time, Time end_time,
bool most_recent_visit_only,
int max_count,
« no previous file with comments | « chrome/browser/history/visit_database.h ('k') | chrome/browser/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698