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

Unified Diff: components/history/core/test/history_client_fake_bookmarks.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/test/history_client_fake_bookmarks.h
diff --git a/components/history/core/test/history_client_fake_bookmarks.h b/components/history/core/test/history_client_fake_bookmarks.h
index ee5c5409c8b6e62bebebeaa2a34fd5cecd041d58..65041ba55883d26f4dca4eefeaaf2a56389d9c09 100644
--- a/components/history/core/test/history_client_fake_bookmarks.h
+++ b/components/history/core/test/history_client_fake_bookmarks.h
@@ -5,12 +5,17 @@
#ifndef COMPONENTS_HISTORY_CORE_TEST_HISTORY_CLIENT_FAKE_BOOKMARKS_H_
#define COMPONENTS_HISTORY_CORE_TEST_HISTORY_CLIENT_FAKE_BOOKMARKS_H_
-#include <map>
-
+#include "base/memory/ref_counted.h"
+#include "base/strings/string16.h"
#include "components/history/core/browser/history_client.h"
+class GURL;
+
namespace history {
+class FakeBookmarkDatabase;
+class HistoryBackendClient;
+
// The class HistoryClientFakeBookmarks implements HistoryClient faking the
// methods relating to bookmarks for unit testing.
class HistoryClientFakeBookmarks : public HistoryClient {
@@ -22,13 +27,16 @@ class HistoryClientFakeBookmarks : public HistoryClient {
void AddBookmark(const GURL& url);
void AddBookmarkWithTitle(const GURL& url, const base::string16& title);
void DelBookmark(const GURL& url);
+ bool IsBookmarked(const GURL& url);
- // HistoryClient:
- bool IsBookmarked(const GURL& url) override;
- void GetBookmarks(std::vector<URLAndTitle>* bookmarks) override;
+ // HistoryClient implementation.
+ void Shutdown() override;
+ bool CanAddURL(const GURL& url) override;
+ void NotifyProfileError(sql::InitStatus init_status) override;
+ scoped_ptr<HistoryBackendClient> CreateBackendClient() override;
private:
- std::map<GURL, base::string16> bookmarks_;
+ scoped_refptr<FakeBookmarkDatabase> bookmarks_;
DISALLOW_COPY_AND_ASSIGN(HistoryClientFakeBookmarks);
};

Powered by Google App Engine
This is Rietveld 408576698