OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef IOS_CHROME_BROWSER_HISTORY_HISTORY_BACKEND_CLIENT_IMPL_H_ | 5 #ifndef IOS_CHROME_BROWSER_HISTORY_HISTORY_BACKEND_CLIENT_IMPL_H_ |
6 #define IOS_CHROME_BROWSER_HISTORY_HISTORY_BACKEND_CLIENT_IMPL_H_ | 6 #define IOS_CHROME_BROWSER_HISTORY_HISTORY_BACKEND_CLIENT_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "components/history/core/browser/history_backend_client.h" | 11 #include "components/history/core/browser/history_backend_client.h" |
12 | 12 |
13 class GURL; | 13 class GURL; |
14 | 14 |
15 namespace bookmarks { | 15 namespace bookmarks { |
16 class BookmarkModel; | 16 class BookmarkModel; |
17 } | 17 } |
18 | 18 |
19 class HistoryBackendClientImpl : public history::HistoryBackendClient { | 19 class HistoryBackendClientImpl : public history::HistoryBackendClient { |
20 public: | 20 public: |
21 explicit HistoryBackendClientImpl(bookmarks::BookmarkModel* bookmark_model); | 21 explicit HistoryBackendClientImpl(bookmarks::BookmarkModel* bookmark_model); |
22 ~HistoryBackendClientImpl() override; | 22 ~HistoryBackendClientImpl() override; |
23 | 23 |
24 private: | 24 private: |
25 // history::HistoryBackendClient implementation. | 25 // history::HistoryBackendClient implementation. |
26 bool IsBookmarked(const GURL& url) override; | 26 bool IsBookmarked(const GURL& url) override; |
27 void GetBookmarks(std::vector<history::URLAndTitle>* bookmarks) override; | 27 void GetBookmarks(std::vector<history::URLAndTitle>* bookmarks) override; |
28 bool ShouldReportDatabaseError() override; | 28 bool ShouldReportDatabaseError() override; |
| 29 bool IsWebSafe(const GURL& url) override; |
29 | 30 |
30 // BookmarkModel instance providing access to bookmarks. May be null during | 31 // BookmarkModel instance providing access to bookmarks. May be null during |
31 // testing but must outlive HistoryBackendClientImpl if non-null. | 32 // testing but must outlive HistoryBackendClientImpl if non-null. |
32 bookmarks::BookmarkModel* bookmark_model_; | 33 bookmarks::BookmarkModel* bookmark_model_; |
33 | 34 |
34 DISALLOW_COPY_AND_ASSIGN(HistoryBackendClientImpl); | 35 DISALLOW_COPY_AND_ASSIGN(HistoryBackendClientImpl); |
35 }; | 36 }; |
36 | 37 |
37 #endif // IOS_CHROME_BROWSER_HISTORY_HISTORY_BACKEND_CLIENT_IMPL_H_ | 38 #endif // IOS_CHROME_BROWSER_HISTORY_HISTORY_BACKEND_CLIENT_IMPL_H_ |
OLD | NEW |