| 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_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 return snippets_status_service_->disabled_reason(); | 119 return snippets_status_service_->disabled_reason(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 // (Re)schedules the periodic fetching of snippets. This is necessary because | 122 // (Re)schedules the periodic fetching of snippets. This is necessary because |
| 123 // the schedule depends on the time of day. | 123 // the schedule depends on the time of day. |
| 124 void RescheduleFetching(); | 124 void RescheduleFetching(); |
| 125 | 125 |
| 126 // ContentSuggestionsProvider implementation | 126 // ContentSuggestionsProvider implementation |
| 127 std::vector<Category> GetProvidedCategories() override; | 127 std::vector<Category> GetProvidedCategories() override; |
| 128 CategoryStatus GetCategoryStatus(Category category) override; | 128 CategoryStatus GetCategoryStatus(Category category) override; |
| 129 CategoryInfo GetCategoryInfo(Category category) override; |
| 129 void DismissSuggestion(const std::string& suggestion_id) override; | 130 void DismissSuggestion(const std::string& suggestion_id) override; |
| 130 void FetchSuggestionImage(const std::string& suggestion_id, | 131 void FetchSuggestionImage(const std::string& suggestion_id, |
| 131 const ImageFetchedCallback& callback) override; | 132 const ImageFetchedCallback& callback) override; |
| 132 void ClearCachedSuggestionsForDebugging(Category category) override; | 133 void ClearCachedSuggestionsForDebugging(Category category) override; |
| 133 std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging( | 134 std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging( |
| 134 Category category) override; | 135 Category category) override; |
| 135 void ClearDismissedSuggestionsForDebugging(Category category) override; | 136 void ClearDismissedSuggestionsForDebugging(Category category) override; |
| 136 | 137 |
| 137 // Returns the lists of suggestion hosts the snippets are restricted to. | 138 // Returns the lists of suggestion hosts the snippets are restricted to. |
| 138 std::set<std::string> GetSuggestionsHosts() const; | 139 std::set<std::string> GetSuggestionsHosts() const; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 bool fetch_after_load_; | 303 bool fetch_after_load_; |
| 303 | 304 |
| 304 const Category provided_category_; | 305 const Category provided_category_; |
| 305 | 306 |
| 306 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); | 307 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); |
| 307 }; | 308 }; |
| 308 | 309 |
| 309 } // namespace ntp_snippets | 310 } // namespace ntp_snippets |
| 310 | 311 |
| 311 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ | 312 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
| OLD | NEW |