| 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_CATEGORY_RANKERS_CATEGORY_RANKER_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_CATEGORY_RANKER_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_CATEGORY_RANKER_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_CATEGORY_RANKER_H_ |
| 7 | 7 |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "components/ntp_snippets/category.h" | 9 #include "components/ntp_snippets/category.h" |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 virtual void ClearHistory(base::Time begin, base::Time end) = 0; | 29 virtual void ClearHistory(base::Time begin, base::Time end) = 0; |
| 30 | 30 |
| 31 // If |category| has not been added previously, it is added after all already | 31 // If |category| has not been added previously, it is added after all already |
| 32 // known categories, otherwise nothing is changed. | 32 // known categories, otherwise nothing is changed. |
| 33 virtual void AppendCategoryIfNecessary(Category category) = 0; | 33 virtual void AppendCategoryIfNecessary(Category category) = 0; |
| 34 | 34 |
| 35 // Feedback data from the user to update the ranking. | 35 // Feedback data from the user to update the ranking. |
| 36 | 36 |
| 37 // Called whenever a suggestion is opened by the user. | 37 // Called whenever a suggestion is opened by the user. |
| 38 virtual void OnSuggestionOpened(Category category) = 0; | 38 virtual void OnSuggestionOpened(Category category) = 0; |
| 39 |
| 40 // Called whenever a category is dismissed by the user. |
| 41 virtual void OnCategoryDismissed(Category category) = 0; |
| 39 }; | 42 }; |
| 40 | 43 |
| 41 } // namespace ntp_snippets | 44 } // namespace ntp_snippets |
| 42 | 45 |
| 43 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_CATEGORY_RANKER_H_ | 46 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_CATEGORY_RANKER_H_ |
| OLD | NEW |