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

Unified Diff: components/history/core/browser/history_service.cc

Issue 1345473003: Added HistoryService::GetHistoryCount() and helper functions in components/history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to msramek's comment Created 5 years, 3 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 | « components/history/core/browser/history_service.h ('k') | components/history/core/browser/history_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/history_service.cc
diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc
index 28bdd51cdb5cca43617ab5ff20c9656477a6cd05..fafadfb240e70eb1f3e558f1ac06bb5f2c7f11c5 100644
--- a/components/history/core/browser/history_service.cc
+++ b/components/history/core/browser/history_service.cc
@@ -667,6 +667,20 @@ base::CancelableTaskTracker::TaskId HistoryService::QueryURL(
base::Owned(query_url_result)));
}
+// Statistics ------------------------------------------------------------------
+
+base::CancelableTaskTracker::TaskId HistoryService::GetHistoryCount(
+ const GetHistoryCountCallback& callback,
+ base::CancelableTaskTracker* tracker) {
+ DCHECK(thread_) << "History service being called after cleanup";
+ DCHECK(thread_checker_.CalledOnValidThread());
+
+ return tracker->PostTaskAndReplyWithResult(
+ thread_->task_runner().get(), FROM_HERE,
+ base::Bind(&HistoryBackend::GetHistoryCount, history_backend_.get()),
+ callback);
+}
+
// Downloads -------------------------------------------------------------------
// Handle creation of a download by creating an entry in the history service's
« no previous file with comments | « components/history/core/browser/history_service.h ('k') | components/history/core/browser/history_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698