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_CONTENT_SUGGESTIONS_PROVIDER_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_ |
6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 const DismissedSuggestionsCallback& callback) = 0; | 135 const DismissedSuggestionsCallback& callback) = 0; |
136 | 136 |
137 // Used only for debugging purposes. Clears the cache of dismissed | 137 // Used only for debugging purposes. Clears the cache of dismissed |
138 // suggestions for the given |category|, if present, so that no suggestions | 138 // suggestions for the given |category|, if present, so that no suggestions |
139 // are suppressed. This does not necessarily make previously dismissed | 139 // are suppressed. This does not necessarily make previously dismissed |
140 // suggestions reappear, as they may have been permanently deleted, depending | 140 // suggestions reappear, as they may have been permanently deleted, depending |
141 // on the provider implementation. | 141 // on the provider implementation. |
142 virtual void ClearDismissedSuggestionsForDebugging(Category category) = 0; | 142 virtual void ClearDismissedSuggestionsForDebugging(Category category) = 0; |
143 | 143 |
144 protected: | 144 protected: |
145 ContentSuggestionsProvider(Observer* observer, | 145 ContentSuggestionsProvider(Observer* observer); |
146 CategoryFactory* category_factory); | |
147 | 146 |
148 Observer* observer() const { return observer_; } | 147 Observer* observer() const { return observer_; } |
149 CategoryFactory* category_factory() const { return category_factory_; } | |
150 | |
151 private: | 148 private: |
152 Observer* observer_; | 149 Observer* observer_; |
153 CategoryFactory* category_factory_; | |
154 }; | 150 }; |
155 | 151 |
156 } // namespace ntp_snippets | 152 } // namespace ntp_snippets |
157 | 153 |
158 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_ | 154 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_ |
OLD | NEW |