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

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

Issue 351363002: Revert of Port HistoryService::GetVisibleVisitCountToHost to CancelableTaskTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 17a013e002eb1dc7d91011eb03494c7699d0e629..200b7d19541cbe9383c46960bfa54f67bf969ffb 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -1321,12 +1321,15 @@
}
void HistoryBackend::GetVisibleVisitCountToHost(
- const GURL& url,
- VisibleVisitCountToHostResult* result) {
- result->count = 0;
- result->success = db_.get() &&
- db_->GetVisibleVisitCountToHost(
- url, &result->count, &result->first_visit);
+ scoped_refptr<GetVisibleVisitCountToHostRequest> request,
+ const GURL& url) {
+ if (request->canceled())
+ return;
+ int count = 0;
+ Time first_visit;
+ const bool success = db_.get() &&
+ db_->GetVisibleVisitCountToHost(url, &count, &first_visit);
+ request->ForwardResult(request->handle(), success, count, first_visit);
}
void HistoryBackend::QueryTopURLsAndRedirects(
« 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