| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 void NotifyCategoryStatusChanged(Category category); | 321 void NotifyCategoryStatusChanged(Category category); |
| 322 | 322 |
| 323 void OnSignInStateChanged(); | 323 void OnSignInStateChanged(); |
| 324 | 324 |
| 325 // Re-enables a dismissed category, making querying its provider possible. | 325 // Re-enables a dismissed category, making querying its provider possible. |
| 326 void RestoreDismissedCategory(Category category); | 326 void RestoreDismissedCategory(Category category); |
| 327 | 327 |
| 328 void RestoreDismissedCategoriesFromPrefs(); | 328 void RestoreDismissedCategoriesFromPrefs(); |
| 329 void StoreDismissedCategoriesToPrefs(); | 329 void StoreDismissedCategoriesToPrefs(); |
| 330 | 330 |
| 331 // Get the domain of the suggestion suitable for fetching the favicon. |
| 332 GURL GetFaviconDomain(const ContentSuggestion::ID& suggestion_id); |
| 331 // Callbacks for fetching favicons. | 333 // Callbacks for fetching favicons. |
| 332 void OnGetFaviconFromCacheFinished( | 334 void OnGetFaviconFromCacheFinished( |
| 333 const GURL& publisher_url, | 335 const GURL& publisher_url, |
| 334 int minimum_size_in_pixel, | 336 int minimum_size_in_pixel, |
| 335 int desired_size_in_pixel, | 337 int desired_size_in_pixel, |
| 336 const ImageFetchedCallback& callback, | 338 const ImageFetchedCallback& callback, |
| 337 bool continue_to_google_server, | 339 bool continue_to_google_server, |
| 338 const favicon_base::LargeIconImageResult& result); | 340 const favicon_base::LargeIconImageResult& result); |
| 339 void OnGetFaviconFromGoogleServerFinished( | 341 void OnGetFaviconFromGoogleServerFinished( |
| 340 const GURL& publisher_url, | 342 const GURL& publisher_url, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 | 410 |
| 409 // Provides order for categories. | 411 // Provides order for categories. |
| 410 std::unique_ptr<CategoryRanker> category_ranker_; | 412 std::unique_ptr<CategoryRanker> category_ranker_; |
| 411 | 413 |
| 412 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService); | 414 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService); |
| 413 }; | 415 }; |
| 414 | 416 |
| 415 } // namespace ntp_snippets | 417 } // namespace ntp_snippets |
| 416 | 418 |
| 417 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ | 419 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ |
| OLD | NEW |