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

Unified Diff: components/history/core/browser/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
Index: components/history/core/browser/history_backend.h
diff --git a/components/history/core/browser/history_backend.h b/components/history/core/browser/history_backend.h
index aa2ce2f623ad0587d8542a007b7e481e0c6c7be0..303847502e6d92ef849e1042dfb818c5eb9b84f4 100644
--- a/components/history/core/browser/history_backend.h
+++ b/components/history/core/browser/history_backend.h
@@ -42,10 +42,10 @@ class SingleThreadTaskRunner;
namespace history {
class CommitLaterTask;
struct DownloadRow;
+class HistoryBackendClient;
class HistoryBackendDBBaseTest;
class HistoryBackendObserver;
class HistoryBackendTest;
-class HistoryClient;
class HistoryDatabase;
struct HistoryDatabaseParams;
struct HistoryDetails;
@@ -171,7 +171,8 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
// may be null.
//
// This constructor is fast and does no I/O, so can be called at any time.
- HistoryBackend(Delegate* delegate, HistoryClient* history_client,
+ HistoryBackend(Delegate* delegate,
+ scoped_ptr<HistoryBackendClient> backend_client,
scoped_refptr<base::SequencedTaskRunner> task_runner);
// Must be called after creation but before any objects are created. If this
@@ -762,10 +763,6 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
// Deletes the FTS index database files, which are no longer used.
void DeleteFTSIndexDatabases();
- // Returns the HistoryClient, blocking until the bookmarks are loaded. This
- // may return null during testing.
- HistoryClient* GetHistoryClient();
-
// Data ----------------------------------------------------------------------
// Delegate. See the class definition above for more information. This will
@@ -823,10 +820,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
std::list<QueuedHistoryDBTask*> queued_history_db_tasks_;
// Used to determine if a URL is bookmarked; may be null.
- //
- // Use GetHistoryClient to access this, which makes sure the bookmarks are
- // loaded before returning.
- HistoryClient* history_client_;
+ scoped_ptr<HistoryBackendClient> backend_client_;
scoped_refptr<base::SequencedTaskRunner> task_runner_;
« no previous file with comments | « components/history/core/browser/expire_history_backend_unittest.cc ('k') | components/history/core/browser/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698