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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 1699143002: [NTP Snippets] Schedule periodic fetching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippets_feature
Patch Set: fix bots Created 4 years, 10 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
« no previous file with comments | « chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 11d852b95da56ef0e26eccf7ce1441165dfb58b9..a5de32353bfd31510a41fb5424bf5be5538b831b 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -12,6 +12,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/deferred_sequenced_task_runner.h"
+#include "base/feature_list.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -106,8 +107,10 @@
#include "chrome/browser/supervised_user/supervised_user_service_factory.h"
#endif
-#if defined(OS_WIN)
-#include "chrome/installer/util/browser_distribution.h"
+#if defined(OS_ANDROID)
+#include "chrome/browser/android/chrome_feature_list.h"
+#include "chrome/browser/ntp_snippets/ntp_snippets_service_factory.h"
+#include "components/ntp_snippets/ntp_snippets_service.h"
#endif
#if defined(OS_CHROMEOS)
@@ -1150,6 +1153,14 @@ void ProfileManager::DoFinalInitForServices(Profile* profile,
// migration code, rough time estimates are Q1 2016.
PasswordManagerSettingMigratorServiceFactory::GetForProfile(profile)
->InitializeMigration(ProfileSyncServiceFactory::GetForProfile(profile));
+
+#if defined(OS_ANDROID)
+ // Service is responsible for fetching content snippets for the NTP.
+ // Note: Create the service even if the feature is disabled, so that any
+ // remaining tasks will be cleaned up.
+ NTPSnippetsServiceFactory::GetForProfile(profile)->Init(
+ base::FeatureList::IsEnabled(chrome::android::kNTPSnippetsFeature));
+#endif
}
void ProfileManager::DoFinalInitLogging(Profile* profile) {
« no previous file with comments | « chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698