OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/history/history_backend.h" | 5 #include "chrome/browser/history/history_backend.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 | 993 |
994 bool HistoryBackend::RemoveVisits(const VisitVector& visits) { | 994 bool HistoryBackend::RemoveVisits(const VisitVector& visits) { |
995 if (!db_.get()) | 995 if (!db_.get()) |
996 return false; | 996 return false; |
997 | 997 |
998 expirer_.ExpireVisits(visits); | 998 expirer_.ExpireVisits(visits); |
999 ScheduleCommit(); | 999 ScheduleCommit(); |
1000 return true; | 1000 return true; |
1001 } | 1001 } |
1002 | 1002 |
| 1003 bool HistoryBackend::GetVisitsSource(const VisitVector& visits, |
| 1004 VisitSourceMap* sources) { |
| 1005 if (!db_.get()) |
| 1006 return false; |
| 1007 |
| 1008 db_->GetVisitsSource(visits, sources); |
| 1009 return true; |
| 1010 } |
| 1011 |
1003 bool HistoryBackend::GetURL(const GURL& url, history::URLRow* url_row) { | 1012 bool HistoryBackend::GetURL(const GURL& url, history::URLRow* url_row) { |
1004 if (db_.get()) | 1013 if (db_.get()) |
1005 return db_->GetRowForURL(url, url_row) != 0; | 1014 return db_->GetRowForURL(url, url_row) != 0; |
1006 return false; | 1015 return false; |
1007 } | 1016 } |
1008 | 1017 |
1009 void HistoryBackend::QueryURL(scoped_refptr<QueryURLRequest> request, | 1018 void HistoryBackend::QueryURL(scoped_refptr<QueryURLRequest> request, |
1010 const GURL& url, | 1019 const GURL& url, |
1011 bool want_visits) { | 1020 bool want_visits) { |
1012 if (request->canceled()) | 1021 if (request->canceled()) |
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2290 break; | 2299 break; |
2291 } | 2300 } |
2292 } | 2301 } |
2293 } | 2302 } |
2294 UMA_HISTOGRAM_TIMES("History.GetFavIconFromDB", // historical name | 2303 UMA_HISTOGRAM_TIMES("History.GetFavIconFromDB", // historical name |
2295 TimeTicks::Now() - beginning_time); | 2304 TimeTicks::Now() - beginning_time); |
2296 return success; | 2305 return success; |
2297 } | 2306 } |
2298 | 2307 |
2299 } // namespace history | 2308 } // namespace history |
OLD | NEW |