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

Unified Diff: chrome/browser/history/chrome_history_client.h

Issue 285233012: Abstract history dependencies on bookmarks through HistoryClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android unit tests Created 6 years, 7 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: chrome/browser/history/chrome_history_client.h
diff --git a/chrome/browser/history/chrome_history_client.h b/chrome/browser/history/chrome_history_client.h
index f6f8d35f1ee3881ae7923044b7537f6a906db91a..24fc1d37a3e47a86479c86dad0671a6f98d444d3 100644
--- a/chrome/browser/history/chrome_history_client.h
+++ b/chrome/browser/history/chrome_history_client.h
@@ -8,11 +8,27 @@
#include "base/macros.h"
#include "components/history/core/browser/history_client.h"
+class BookmarkModel;
+
+// This class implements history::HistoryClient to abstract operations that
+// depend on Chrome environment.
class ChromeHistoryClient : public history::HistoryClient {
public:
- ChromeHistoryClient();
+ explicit ChromeHistoryClient(BookmarkModel* bookmark_model);
+
+ // history::HistoryClient:
+ virtual void BlockUntilBookmarksLoaded() OVERRIDE;
+ virtual bool IsBookmarked(const GURL& url) OVERRIDE;
+ virtual void GetBookmarks(
+ std::vector<history::URLAndTitle>* bookmarks) OVERRIDE;
+
+ // KeyedService:
+ virtual void Shutdown() OVERRIDE;
+
+ private:
+ // The BookmarkModel, this should outlive ChromeHistoryClient.
+ BookmarkModel* bookmark_model_;
- protected:
DISALLOW_COPY_AND_ASSIGN(ChromeHistoryClient);
};
« no previous file with comments | « chrome/browser/history/android/android_provider_backend_unittest.cc ('k') | chrome/browser/history/chrome_history_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698