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

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 2102023002: Add ContentSuggestionsService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Marks comments; Disable ContentSuggestionsService by default, only enable on Android Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/profiles/profile_manager.h" 5 #include "chrome/browser/profiles/profile_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #endif 100 #endif
101 101
102 #if defined(ENABLE_SUPERVISED_USERS) 102 #if defined(ENABLE_SUPERVISED_USERS)
103 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" 103 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
104 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa ctory.h" 104 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa ctory.h"
105 #include "chrome/browser/supervised_user/supervised_user_service.h" 105 #include "chrome/browser/supervised_user/supervised_user_service.h"
106 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" 106 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
107 #endif 107 #endif
108 108
109 #if defined(OS_ANDROID) 109 #if defined(OS_ANDROID)
110 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h"
110 #include "chrome/browser/ntp_snippets/ntp_snippets_service_factory.h" 111 #include "chrome/browser/ntp_snippets/ntp_snippets_service_factory.h"
112 #include "components/ntp_snippets/content_suggestions_service.h"
anthonyvd 2016/07/07 14:25:45 Is this include necessary?
Philipp Keck 2016/07/07 14:36:39 It is indeed not necessary, I also remove the one
111 #include "components/ntp_snippets/ntp_snippets_service.h" 113 #include "components/ntp_snippets/ntp_snippets_service.h"
112 #endif 114 #endif
113 115
114 #if defined(OS_CHROMEOS) 116 #if defined(OS_CHROMEOS)
115 #include "chrome/browser/browser_process_platform_part_chromeos.h" 117 #include "chrome/browser/browser_process_platform_part_chromeos.h"
116 #include "chrome/browser/chromeos/profiles/profile_helper.h" 118 #include "chrome/browser/chromeos/profiles/profile_helper.h"
117 #include "chromeos/chromeos_switches.h" 119 #include "chromeos/chromeos_switches.h"
118 #include "chromeos/dbus/cryptohome_client.h" 120 #include "chromeos/dbus/cryptohome_client.h"
119 #include "chromeos/dbus/dbus_thread_manager.h" 121 #include "chromeos/dbus/dbus_thread_manager.h"
120 #include "components/user_manager/user.h" 122 #include "components/user_manager/user.h"
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 // Service is responsible for migration of the legacy password manager 1222 // Service is responsible for migration of the legacy password manager
1221 // preference which controls behaviour of the Chrome to the new preference 1223 // preference which controls behaviour of the Chrome to the new preference
1222 // which controls password management behaviour on Chrome and Android. After 1224 // which controls password management behaviour on Chrome and Android. After
1223 // migration will be performed for all users it's planned to remove the 1225 // migration will be performed for all users it's planned to remove the
1224 // migration code, rough time estimates are Q1 2016. 1226 // migration code, rough time estimates are Q1 2016.
1225 PasswordManagerSettingMigratorServiceFactory::GetForProfile(profile) 1227 PasswordManagerSettingMigratorServiceFactory::GetForProfile(profile)
1226 ->InitializeMigration(ProfileSyncServiceFactory::GetForProfile(profile)); 1228 ->InitializeMigration(ProfileSyncServiceFactory::GetForProfile(profile));
1227 1229
1228 #if defined(OS_ANDROID) 1230 #if defined(OS_ANDROID)
1229 // Service is responsible for fetching content snippets for the NTP. 1231 // Service is responsible for fetching content snippets for the NTP.
1232 ContentSuggestionsServiceFactory::GetForProfile(profile);
1230 NTPSnippetsServiceFactory::GetForProfile(profile); 1233 NTPSnippetsServiceFactory::GetForProfile(profile);
1231 #endif 1234 #endif
1232 } 1235 }
1233 1236
1234 void ProfileManager::DoFinalInitLogging(Profile* profile) { 1237 void ProfileManager::DoFinalInitLogging(Profile* profile) {
1235 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging"); 1238 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging");
1236 // Count number of extensions in this profile. 1239 // Count number of extensions in this profile.
1237 int enabled_app_count = -1; 1240 int enabled_app_count = -1;
1238 #if defined(ENABLE_EXTENSIONS) 1241 #if defined(ENABLE_EXTENSIONS)
1239 enabled_app_count = GetEnabledAppCount(profile); 1242 enabled_app_count = GetEnabledAppCount(profile);
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 1632
1630 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); 1633 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path);
1631 if (!original_callback.is_null()) 1634 if (!original_callback.is_null())
1632 original_callback.Run(loaded_profile, status); 1635 original_callback.Run(loaded_profile, status);
1633 } 1636 }
1634 #endif // !defined(OS_ANDROID) 1637 #endif // !defined(OS_ANDROID)
1635 1638
1636 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1639 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1637 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1640 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1638 } 1641 }
OLDNEW
« no previous file with comments | « chrome/browser/ntp_snippets/content_suggestions_service_factory.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698