1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_HISTORY_CORE_TEST_HISTORY_CLIENT_FAKE_BOOKMARKS_H_
6 #define COMPONENTS_HISTORY_CORE_TEST_HISTORY_CLIENT_FAKE_BOOKMARKS_H_
10 #include "components/history/core/browser/history_client.h"
14 // The class HistoryClientFakeBookmarks implements HistoryClient faking the
15 // methods relating to bookmarks for unit testing.
16 class HistoryClientFakeBookmarks : public HistoryClient {
18 HistoryClientFakeBookmarks();
19 ~HistoryClientFakeBookmarks() override;
21 void ClearAllBookmarks();
22 void AddBookmark(const GURL& url);
23 void AddBookmarkWithTitle(const GURL& url, const base::string16& title);
24 void DelBookmark(const GURL& url);
27 bool IsBookmarked(const GURL& url) override;
28 void GetBookmarks(std::vector<URLAndTitle>* bookmarks) override;
31 std::map<GURL, base::string16> bookmarks_;
33 DISALLOW_COPY_AND_ASSIGN(HistoryClientFakeBookmarks);
36 } // namespace history
38 #endif // COMPONENTS_HISTORY_CORE_TEST_HISTORY_CLIENT_FAKE_BOOKMARKS_H_