| Index: chrome/browser/history/url_database.cc
|
| ===================================================================
|
| --- chrome/browser/history/url_database.cc (revision 177135)
|
| +++ chrome/browser/history/url_database.cc (working copy)
|
| @@ -111,6 +111,31 @@
|
| return true;
|
| }
|
|
|
| +bool URLDatabase::GetUniqueURLsInRange(base::Time begin_time,
|
| + base::Time end_time,
|
| + int max_results,
|
| + URLRows* urls) {
|
| + sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
|
| + "SELECT DISTINCT" HISTORY_URL_ROW_FIELDS "FROM urls "
|
| + "WHERE last_visit_time > ? AND last_visit_time < ? "
|
| + "ORDER BY last_visit_time LIMIT ?"));
|
| +
|
| + // See VisitDatabase::GetVisibleVisitsInRange for more info on how these
|
| + // times are bound.
|
| + int64 end = end_time.ToInternalValue();
|
| + statement.BindInt64(0, begin_time.ToInternalValue());
|
| + statement.BindInt64(1, end ? end : std::numeric_limits<int64>::max());
|
| + statement.BindInt64(2,
|
| + max_results ? max_results : std::numeric_limits<int64>::max());
|
| +
|
| + while (statement.Step()) {
|
| + URLRow info;
|
| + FillURLRow(statement, &info);
|
| + urls->push_back(info);
|
| + }
|
| + return true;
|
| +}
|
| +
|
| URLID URLDatabase::GetRowForURL(const GURL& url, history::URLRow* info) {
|
| sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
|
| "SELECT" HISTORY_URL_ROW_FIELDS "FROM urls WHERE url=?"));
|
|
|