| 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_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 343 |
| 344 // Updates the category info for |category|. If a corresponding | 344 // Updates the category info for |category|. If a corresponding |
| 345 // CategoryContent object does not exist, it will be created. | 345 // CategoryContent object does not exist, it will be created. |
| 346 // Returns the existing or newly created object. | 346 // Returns the existing or newly created object. |
| 347 CategoryContent* UpdateCategoryInfo(Category category, | 347 CategoryContent* UpdateCategoryInfo(Category category, |
| 348 const CategoryInfo& info); | 348 const CategoryInfo& info); |
| 349 | 349 |
| 350 void RestoreCategoriesFromPrefs(); | 350 void RestoreCategoriesFromPrefs(); |
| 351 void StoreCategoriesToPrefs(); | 351 void StoreCategoriesToPrefs(); |
| 352 | 352 |
| 353 NTPSnippetsFetcher::Params BuildFetchParams( | 353 NTPSnippetsFetcher::Params BuildFetchParams() const; |
| 354 bool exclude_archived_suggestions) const; | |
| 355 | 354 |
| 356 void MarkEmptyCategoriesAsLoading(); | 355 void MarkEmptyCategoriesAsLoading(); |
| 357 | 356 |
| 358 State state_; | 357 State state_; |
| 359 | 358 |
| 360 PrefService* pref_service_; | 359 PrefService* pref_service_; |
| 361 | 360 |
| 362 const Category articles_category_; | 361 const Category articles_category_; |
| 363 | 362 |
| 364 std::map<Category, CategoryContent, Category::CompareByID> category_contents_; | 363 std::map<Category, CategoryContent, Category::CompareByID> category_contents_; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 395 |
| 397 // Request throttler for limiting requests to thumbnail images. | 396 // Request throttler for limiting requests to thumbnail images. |
| 398 RequestThrottler thumbnail_requests_throttler_; | 397 RequestThrottler thumbnail_requests_throttler_; |
| 399 | 398 |
| 400 DISALLOW_COPY_AND_ASSIGN(RemoteSuggestionsProvider); | 399 DISALLOW_COPY_AND_ASSIGN(RemoteSuggestionsProvider); |
| 401 }; | 400 }; |
| 402 | 401 |
| 403 } // namespace ntp_snippets | 402 } // namespace ntp_snippets |
| 404 | 403 |
| 405 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_H_ | 404 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_H_ |
| OLD | NEW |