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

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

Issue 43054: Stop history search going on beyond the start of history.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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: chrome/browser/history/visit_database.cc
===================================================================
--- chrome/browser/history/visit_database.cc (revision 11260)
+++ chrome/browser/history/visit_database.cc (working copy)
@@ -368,4 +368,16 @@
return true;
}
+bool VisitDatabase::GetStartDate(Time* first_visit) {
+ SQLITE_UNIQUE_STATEMENT(statement, GetStatementCache(),
+ "SELECT MIN(visit_time) FROM visits WHERE visit_time != 0");
+ if (!statement.is_valid() || statement->step() != SQLITE_ROW ||
+ statement->column_int64(0) == 0) {
+ *first_visit = Time::Now();
+ return false;
+ }
+ *first_visit = Time::FromInternalValue(statement->column_int64(0));
+ return true;
+}
+
} // namespace history

Powered by Google App Engine
This is Rietveld 408576698