| 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_CONTENT_SUGGESTIONS_SERVICE_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 void OnSignInStateChanged(); | 325 void OnSignInStateChanged(); |
| 326 | 326 |
| 327 // Re-enables a dismissed category, making querying its provider possible. | 327 // Re-enables a dismissed category, making querying its provider possible. |
| 328 void RestoreDismissedCategory(Category category); | 328 void RestoreDismissedCategory(Category category); |
| 329 | 329 |
| 330 void RestoreDismissedCategoriesFromPrefs(); | 330 void RestoreDismissedCategoriesFromPrefs(); |
| 331 void StoreDismissedCategoriesToPrefs(); | 331 void StoreDismissedCategoriesToPrefs(); |
| 332 | 332 |
| 333 // Get the domain of the suggestion suitable for fetching the favicon. | 333 // Get the domain of the suggestion suitable for fetching the favicon. |
| 334 GURL GetFaviconDomain(const ContentSuggestion::ID& suggestion_id); | 334 GURL GetFaviconDomain(const ContentSuggestion::ID& suggestion_id); |
| 335 |
| 336 // Initiate the fetch of a favicon from the local cache. |
| 337 void GetFaviconFromCache(const GURL& publisher_url, |
| 338 int minimum_size_in_pixel, |
| 339 int desired_size_in_pixel, |
| 340 const ImageFetchedCallback& callback, |
| 341 bool continue_to_google_server); |
| 342 |
| 335 // Callbacks for fetching favicons. | 343 // Callbacks for fetching favicons. |
| 336 void OnGetFaviconFromCacheFinished( | 344 void OnGetFaviconFromCacheFinished( |
| 337 const GURL& publisher_url, | 345 const GURL& publisher_url, |
| 338 int minimum_size_in_pixel, | 346 int minimum_size_in_pixel, |
| 339 int desired_size_in_pixel, | 347 int desired_size_in_pixel, |
| 340 const ImageFetchedCallback& callback, | 348 const ImageFetchedCallback& callback, |
| 341 bool continue_to_google_server, | 349 bool continue_to_google_server, |
| 342 const favicon_base::LargeIconImageResult& result); | 350 const favicon_base::LargeIconImageResult& result); |
| 343 void OnGetFaviconFromGoogleServerFinished( | 351 void OnGetFaviconFromGoogleServerFinished( |
| 344 const GURL& publisher_url, | 352 const GURL& publisher_url, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 | 420 |
| 413 // Provides order for categories. | 421 // Provides order for categories. |
| 414 std::unique_ptr<CategoryRanker> category_ranker_; | 422 std::unique_ptr<CategoryRanker> category_ranker_; |
| 415 | 423 |
| 416 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService); | 424 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService); |
| 417 }; | 425 }; |
| 418 | 426 |
| 419 } // namespace ntp_snippets | 427 } // namespace ntp_snippets |
| 420 | 428 |
| 421 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ | 429 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ |
| OLD | NEW |