Chromium Code Reviews| Index: chrome/browser/ntp_snippets/content_suggestions_service_factory.cc |
| diff --git a/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc b/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc |
| index 012a024bb7e61e82394faffc616290216b300472..ec81611f397807802fc44d407be27ebd1f1b1430 100644 |
| --- a/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc |
| +++ b/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc |
| @@ -61,6 +61,7 @@ |
| #include "chrome/browser/android/chrome_feature_list.h" |
| #include "chrome/browser/android/ntp/ntp_snippets_launcher.h" |
| #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" |
| +#include "chrome/browser/android/offline_pages/offline_page_suggestions_observer.h" |
| #include "chrome/browser/android/offline_pages/request_coordinator_factory.h" |
| #include "chrome/browser/download/download_history.h" |
| #include "chrome/browser/download/download_service.h" |
| @@ -362,6 +363,12 @@ KeyedService* ContentSuggestionsServiceFactory::BuildServiceInstanceFor( |
| show_asset_downloads ? download_manager : nullptr, download_history, |
| service, pref_service); |
| } |
| + |
| + if (offline_pages::IsPrefetchingOfflinePagesEnabled()) { |
| + offline_pages::OfflinePageSuggestionsObserver:: |
| + ObserveContentSuggestionsService(profile, offline_page_model, service); |
|
carlosk
2017/04/11 17:31:36
How about renaming the Observer* method to MaybeOb
dewittj
2017/04/11 21:25:48
Done, though I don't think the Maybe is strictly n
|
| + } |
| + |
| #endif // OS_ANDROID |
| // |bookmark_model| can be null in tests. |