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

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

Issue 336633004: Code cleanup in HistoryService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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/history_backend.h ('k') | chrome/browser/history/history_marshaling.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_backend.cc
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 200b7d19541cbe9383c46960bfa54f67bf969ffb..3fe02d0e5abc1b94c9592addf2c9f6e7c2a12ff7 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -1332,35 +1332,6 @@ void HistoryBackend::GetVisibleVisitCountToHost(
request->ForwardResult(request->handle(), success, count, first_visit);
}
-void HistoryBackend::QueryTopURLsAndRedirects(
- scoped_refptr<QueryTopURLsAndRedirectsRequest> request,
- int result_count) {
- if (request->canceled())
- return;
-
- if (!db_) {
- request->ForwardResult(request->handle(), false, NULL, NULL);
- return;
- }
-
- std::vector<GURL>* top_urls = &request->value.a;
- history::RedirectMap* redirects = &request->value.b;
-
- ScopedVector<PageUsageData> data;
- db_->QuerySegmentUsage(base::Time::Now() - base::TimeDelta::FromDays(90),
- result_count, &data.get());
-
- for (size_t i = 0; i < data.size(); ++i) {
- top_urls->push_back(data[i]->GetURL());
- RefCountedVector<GURL>* list = new RefCountedVector<GURL>;
- QueryRedirectsFrom(top_urls->back(), &list->data);
- (*redirects)[top_urls->back()] = list;
- }
-
- request->ForwardResult(request->handle(), true, top_urls, redirects);
-}
-
-// Will replace QueryTopURLsAndRedirectsRequest.
void HistoryBackend::QueryMostVisitedURLs(
scoped_refptr<QueryMostVisitedURLsRequest> request,
int result_count,
« no previous file with comments | « chrome/browser/history/history_backend.h ('k') | chrome/browser/history/history_marshaling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698