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

Unified Diff: components/history/core/browser/expire_history_backend.h

Issue 1198373002: Split HistoryClient in two objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1192403002
Patch Set: Add comments in ChromeHistoryBackendClient Created 5 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 | « components/history/core/browser/BUILD.gn ('k') | components/history/core/browser/expire_history_backend.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/expire_history_backend.h
diff --git a/components/history/core/browser/expire_history_backend.h b/components/history/core/browser/expire_history_backend.h
index 89146875d9b2265ca9ff1b61ec8f69a5f7b71a97..70a20f870050fbdb6d78870b2eee5b4f0bd0d18d 100644
--- a/components/history/core/browser/expire_history_backend.h
+++ b/components/history/core/browser/expire_history_backend.h
@@ -21,8 +21,8 @@ class TestingProfile;
namespace history {
+class HistoryBackendClient;
class HistoryBackendNotifier;
-class HistoryClient;
class HistoryDatabase;
class ThumbnailDatabase;
@@ -45,12 +45,12 @@ typedef std::vector<const ExpiringVisitsReader*> ExpiringVisitsReaders;
// StartExpiringOldStuff().
class ExpireHistoryBackend {
public:
- // The delegate pointer must be non-NULL. We will NOT take ownership of it.
- // HistoryClient may be NULL. The HistoryClient is used when expiring URLS so
- // that we don't remove any URLs or favicons that are bookmarked (visits are
- // removed though).
+ // The delegate pointer must be non-null. We will NOT take ownership of it.
+ // HistoryBackendClient may be null. The HistoryBackendClient is used when
+ // expiring URLS so that we don't remove any URLs or favicons that are
+ // bookmarked (visits are removed though).
ExpireHistoryBackend(HistoryBackendNotifier* notifier,
- HistoryClient* history_client,
+ HistoryBackendClient* backend_client,
scoped_refptr<base::SequencedTaskRunner> task_runner);
~ExpireHistoryBackend();
@@ -214,10 +214,6 @@ class ExpireHistoryBackend {
// and deletes items. For example, URLs with no visits.
void ParanoidExpireHistory();
- // Returns the HistoryClient, blocking until the bookmarks are loaded. This
- // may return NULL during testing.
- HistoryClient* GetHistoryClient();
-
// Initializes periodic expiration work queue by populating it with with tasks
// for all known readers.
void InitWorkQueue();
@@ -255,11 +251,8 @@ class ExpireHistoryBackend {
scoped_ptr<ExpiringVisitsReader> all_visits_reader_;
scoped_ptr<ExpiringVisitsReader> auto_subframe_visits_reader_;
- // The HistoryClient; may be NULL.
- //
- // Use GetHistoryClient to access this, which makes sure the bookmarks are
- // loaded before returning.
- HistoryClient* history_client_;
+ // The HistoryBackendClient; may be null.
+ HistoryBackendClient* backend_client_;
scoped_refptr<base::SequencedTaskRunner> task_runner_;
« no previous file with comments | « components/history/core/browser/BUILD.gn ('k') | components/history/core/browser/expire_history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698