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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
285 void UpdateAllCategoryStatus(CategoryStatus status); | 285 void UpdateAllCategoryStatus(CategoryStatus status); |
286 | 286 |
287 State state_; | 287 State state_; |
288 | 288 |
289 PrefService* pref_service_; | 289 PrefService* pref_service_; |
290 | 290 |
291 suggestions::SuggestionsService* suggestions_service_; | 291 suggestions::SuggestionsService* suggestions_service_; |
292 | 292 |
293 const Category articles_category_; | 293 const Category articles_category_; |
294 | 294 |
295 struct CategoryContent { | 295 struct CategoryContent { |
tschumann
2016/08/29 09:59:53
this struct has some overlap with CategoryInfo.
Wo
Michael van Ouwerkerk
2016/09/08 13:03:27
I've added a TODO to consider this for a followup
| |
296 CategoryStatus status = CategoryStatus::INITIALIZING; | 296 CategoryStatus status = CategoryStatus::INITIALIZING; |
297 | 297 |
298 // The title of the section, localized to the running UI language. | |
299 base::string16 localized_title; | |
300 | |
298 // True iff the server returned results in this category in the last fetch. | 301 // True iff the server returned results in this category in the last fetch. |
299 // We never remove categories that the server still provides, but if the | 302 // We never remove categories that the server still provides, but if the |
300 // server stops providing a category, we won't yet report it as NOT_PROVIDED | 303 // server stops providing a category, we won't yet report it as NOT_PROVIDED |
301 // while we still have non-expired snippets in it. | 304 // while we still have non-expired snippets in it. |
302 bool provided_by_server = true; | 305 bool provided_by_server = true; |
303 | 306 |
304 // All current suggestions (i.e. not dismissed ones). | 307 // All current suggestions (i.e. not dismissed ones). |
305 NTPSnippet::PtrVector snippets; | 308 NTPSnippet::PtrVector snippets; |
306 | 309 |
307 // Suggestions that the user dismissed. We keep these around until they | 310 // Suggestions that the user dismissed. We keep these around until they |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
358 | 361 |
359 // Request throttler for limiting requests to thumbnail images. | 362 // Request throttler for limiting requests to thumbnail images. |
360 RequestThrottler thumbnail_requests_throttler_; | 363 RequestThrottler thumbnail_requests_throttler_; |
361 | 364 |
362 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); | 365 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); |
363 }; | 366 }; |
364 | 367 |
365 } // namespace ntp_snippets | 368 } // namespace ntp_snippets |
366 | 369 |
367 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ | 370 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
OLD | NEW |