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 COMPONENTS_SYNC_SESSIONS_REVISIT_BOOKMARKS_PAGE_REVISIT_OBSERVER_H_ | 5 #ifndef COMPONENTS_SYNC_SESSIONS_REVISIT_BOOKMARKS_PAGE_REVISIT_OBSERVER_H_ |
6 #define COMPONENTS_SYNC_SESSIONS_REVISIT_BOOKMARKS_PAGE_REVISIT_OBSERVER_H_ | 6 #define COMPONENTS_SYNC_SESSIONS_REVISIT_BOOKMARKS_PAGE_REVISIT_OBSERVER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "components/sync_sessions/revisit/page_visit_observer.h" | 12 #include "components/sync_sessions/revisit/page_visit_observer.h" |
13 | 13 |
14 class GURL; | 14 class GURL; |
15 | 15 |
16 namespace bookmarks { | 16 namespace bookmarks { |
17 class BookmarkModel; | |
18 class BookmarkNode; | 17 class BookmarkNode; |
19 } // namespace bookmarks | 18 } // namespace bookmarks |
20 | 19 |
21 namespace sync_sessions { | 20 namespace sync_sessions { |
22 | 21 |
23 // A simple interface to abstract away who is providing bookmarks. | 22 // A simple interface to abstract away who is providing bookmarks. |
24 class BookmarksByUrlProvider { | 23 class BookmarksByUrlProvider { |
25 public: | 24 public: |
26 // Fills the passed vector with all bookmark nodes for the given URL. | 25 // Fills the passed vector with all bookmark nodes for the given URL. |
27 virtual void GetNodesByURL( | 26 virtual void GetNodesByURL( |
(...skipping 17 matching lines...) Expand all Loading... |
45 void OnPageVisit(const GURL& url, const TransitionType transition) override; | 44 void OnPageVisit(const GURL& url, const TransitionType transition) override; |
46 | 45 |
47 private: | 46 private: |
48 std::unique_ptr<BookmarksByUrlProvider> provider_; | 47 std::unique_ptr<BookmarksByUrlProvider> provider_; |
49 DISALLOW_COPY_AND_ASSIGN(BookmarksPageRevisitObserver); | 48 DISALLOW_COPY_AND_ASSIGN(BookmarksPageRevisitObserver); |
50 }; | 49 }; |
51 | 50 |
52 } // namespace sync_sessions | 51 } // namespace sync_sessions |
53 | 52 |
54 #endif // COMPONENTS_SYNC_SESSIONS_REVISIT_BOOKMARKS_PAGE_REVISIT_OBSERVER_H_ | 53 #endif // COMPONENTS_SYNC_SESSIONS_REVISIT_BOOKMARKS_PAGE_REVISIT_OBSERVER_H_ |
OLD | NEW |