| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 friend class RecentTabSuggestionsProviderTest; | 67 friend class RecentTabSuggestionsProviderTest; |
| 68 | 68 |
| 69 void GetPagesMatchingQueryCallbackForGetDismissedSuggestions( | 69 void GetPagesMatchingQueryCallbackForGetDismissedSuggestions( |
| 70 const DismissedSuggestionsCallback& callback, | 70 const DismissedSuggestionsCallback& callback, |
| 71 const std::vector<offline_pages::OfflinePageItem>& offline_pages) const; | 71 const std::vector<offline_pages::OfflinePageItem>& offline_pages) const; |
| 72 | 72 |
| 73 // OfflinePageModel::Observer implementation. | 73 // OfflinePageModel::Observer implementation. |
| 74 void OfflinePageModelLoaded(offline_pages::OfflinePageModel* model) override; | 74 void OfflinePageModelLoaded(offline_pages::OfflinePageModel* model) override; |
| 75 void OfflinePageModelChanged(offline_pages::OfflinePageModel* model) override; | 75 void OfflinePageAdded( |
| 76 offline_pages::OfflinePageModel* model, |
| 77 const offline_pages::OfflinePageItem& added_page) override; |
| 76 void OfflinePageDeleted(int64_t offline_id, | 78 void OfflinePageDeleted(int64_t offline_id, |
| 77 const offline_pages::ClientId& client_id) override; | 79 const offline_pages::ClientId& client_id) override; |
| 78 | 80 |
| 79 void GetPagesMatchingQueryCallbackForFetchRecentTabs( | 81 void GetPagesMatchingQueryCallbackForFetchRecentTabs( |
| 80 const std::vector<offline_pages::OfflinePageItem>& offline_pages); | 82 const std::vector<offline_pages::OfflinePageItem>& offline_pages); |
| 81 | 83 |
| 82 // Updates the |category_status_| of the |provided_category_| and notifies the | 84 // Updates the |category_status_| of the |provided_category_| and notifies the |
| 83 // |observer_|, if necessary. | 85 // |observer_|, if necessary. |
| 84 void NotifyStatusChanged(CategoryStatus new_status); | 86 void NotifyStatusChanged(CategoryStatus new_status); |
| 85 | 87 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 116 PrefService* pref_service_; | 118 PrefService* pref_service_; |
| 117 | 119 |
| 118 base::WeakPtrFactory<RecentTabSuggestionsProvider> weak_ptr_factory_; | 120 base::WeakPtrFactory<RecentTabSuggestionsProvider> weak_ptr_factory_; |
| 119 | 121 |
| 120 DISALLOW_COPY_AND_ASSIGN(RecentTabSuggestionsProvider); | 122 DISALLOW_COPY_AND_ASSIGN(RecentTabSuggestionsProvider); |
| 121 }; | 123 }; |
| 122 | 124 |
| 123 } // namespace ntp_snippets | 125 } // namespace ntp_snippets |
| 124 | 126 |
| 125 #endif // COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER
_H_ | 127 #endif // COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER
_H_ |
| OLD | NEW |