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 |
new file mode 100644 |
index 0000000000000000000000000000000000000000..12633d57e51252a4fc204b100213c3be6df8826d |
--- /dev/null |
+++ b/components/history/core/test/history_client_fake_bookmarks.h |
@@ -0,0 +1,37 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_HISTORY_CORE_TEST_HISTORY_CLIENT_FAKE_BOOKMARKS_H_ |
+#define COMPONENTS_HISTORY_CORE_TEST_HISTORY_CLIENT_FAKE_BOOKMARKS_H_ |
+ |
+#include <set> |
+ |
+#include "components/history/core/browser/history_client.h" |
+ |
+namespace history { |
+ |
+// The class HistoryClientFakeBookmarks implements HistoryClient faking the |
+// methods relating to bookmarks for unit testing. |
+class HistoryClientFakeBookmarks : public HistoryClient { |
+ public: |
+ HistoryClientFakeBookmarks(); |
+ virtual ~HistoryClientFakeBookmarks(); |
+ |
+ void ClearAllBookmarks(); |
+ void AddBookmark(const GURL& url); |
+ void DelBookmark(const GURL& url); |
+ |
+ // HistoryClient: |
+ bool IsBookmarked(const GURL& url) OVERRIDE; |
+ void GetBookmarks(std::vector<URLAndTitle>* bookmarks) OVERRIDE; |
+ |
+ private: |
+ std::set<GURL> bookmarked_urls_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(HistoryClientFakeBookmarks); |
+}; |
+ |
+} // namespace history |
+ |
+#endif // COMPONENTS_HISTORY_CORE_TEST_HISTORY_CLIENT_FAKE_BOOKMARKS_H_ |