Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2364)

Unified Diff: chrome/browser/ntp_snippets/content_suggestions_service_factory.cc

Issue 2811813002: [Offline Pages] Set up the initial prefetching service. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698