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

Unified Diff: components/history/core/browser/history_backend.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: 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
Index: components/history/core/browser/history_backend.cc
diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
index 8e4cfaaf74944b0e1a3ca9a134fba7ddd0b29c35..33dc9c68125d96e5f30cf209c14d2306642bb4e4 100644
--- a/components/history/core/browser/history_backend.cc
+++ b/components/history/core/browser/history_backend.cc
@@ -1054,6 +1054,20 @@ TypedUrlSyncableService* HistoryBackend::GetTypedUrlSyncableService() const {
return typed_url_syncable_service_.get();
}
+// Statistics ------------------------------------------------------------------
+
+HistoryCountResult HistoryBackend::GetHistoryCount() {
+ HistoryCountResult result;
+ if (!db_) {
+ result.success = false;
+ result.count = 0;
+ } else {
+ result.success = true;
+ result.count = db_->GetHistoryCount();
+ }
+ return result;
+}
+
// Keyword visits --------------------------------------------------------------
void HistoryBackend::SetKeywordSearchTermsForURL(const GURL& url,

Powered by Google App Engine
This is Rietveld 408576698