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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // if it's not. | 124 // if it's not. |
125 DisabledReason disabled_reason() const { | 125 DisabledReason disabled_reason() const { |
126 return snippets_status_service_->disabled_reason(); | 126 return snippets_status_service_->disabled_reason(); |
127 } | 127 } |
128 | 128 |
129 // (Re)schedules the periodic fetching of snippets. This is necessary because | 129 // (Re)schedules the periodic fetching of snippets. This is necessary because |
130 // the schedule depends on the time of day. | 130 // the schedule depends on the time of day. |
131 void RescheduleFetching(); | 131 void RescheduleFetching(); |
132 | 132 |
133 // ContentSuggestionsProvider implementation | 133 // ContentSuggestionsProvider implementation |
134 std::vector<Category> GetProvidedCategories() override; | |
135 CategoryStatus GetCategoryStatus(Category category) override; | 134 CategoryStatus GetCategoryStatus(Category category) override; |
136 CategoryInfo GetCategoryInfo(Category category) override; | 135 CategoryInfo GetCategoryInfo(Category category) override; |
137 void DismissSuggestion(const std::string& suggestion_id) override; | 136 void DismissSuggestion(const std::string& suggestion_id) override; |
138 void FetchSuggestionImage(const std::string& suggestion_id, | 137 void FetchSuggestionImage(const std::string& suggestion_id, |
139 const ImageFetchedCallback& callback) override; | 138 const ImageFetchedCallback& callback) override; |
140 void ClearCachedSuggestionsForDebugging(Category category) override; | 139 void ClearCachedSuggestionsForDebugging(Category category) override; |
141 std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging( | 140 std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging( |
142 Category category) override; | 141 Category category) override; |
143 void ClearDismissedSuggestionsForDebugging(Category category) override; | 142 void ClearDismissedSuggestionsForDebugging(Category category) override; |
144 | 143 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 | 316 |
318 // Request throttler for limiting requests to thumbnail images. | 317 // Request throttler for limiting requests to thumbnail images. |
319 RequestThrottler thumbnail_requests_throttler_; | 318 RequestThrottler thumbnail_requests_throttler_; |
320 | 319 |
321 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); | 320 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); |
322 }; | 321 }; |
323 | 322 |
324 } // namespace ntp_snippets | 323 } // namespace ntp_snippets |
325 | 324 |
326 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ | 325 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
OLD | NEW |