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

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

Issue 2205233002: Combine all suggestions factories into ContentSuggestionsServiceFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bernhard's comments Created 4 years, 4 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/android/ntp/offline_page_suggestions_provider_factory.h "
111 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h" 110 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h"
112 #include "chrome/browser/ntp_snippets/ntp_snippets_service_factory.h"
113 #endif 111 #endif
114 112
115 #if defined(OS_CHROMEOS) 113 #if defined(OS_CHROMEOS)
116 #include "chrome/browser/browser_process_platform_part_chromeos.h" 114 #include "chrome/browser/browser_process_platform_part_chromeos.h"
117 #include "chrome/browser/chromeos/profiles/profile_helper.h" 115 #include "chrome/browser/chromeos/profiles/profile_helper.h"
118 #include "chromeos/chromeos_switches.h" 116 #include "chromeos/chromeos_switches.h"
119 #include "chromeos/dbus/cryptohome_client.h" 117 #include "chromeos/dbus/cryptohome_client.h"
120 #include "chromeos/dbus/dbus_thread_manager.h" 118 #include "chromeos/dbus/dbus_thread_manager.h"
121 #include "components/user_manager/user.h" 119 #include "components/user_manager/user.h"
122 #include "components/user_manager/user_manager.h" 120 #include "components/user_manager/user_manager.h"
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 // preference which controls behaviour of the Chrome to the new preference 1220 // preference which controls behaviour of the Chrome to the new preference
1223 // which controls password management behaviour on Chrome and Android. After 1221 // which controls password management behaviour on Chrome and Android. After
1224 // migration will be performed for all users it's planned to remove the 1222 // migration will be performed for all users it's planned to remove the
1225 // migration code, rough time estimates are Q1 2016. 1223 // migration code, rough time estimates are Q1 2016.
1226 PasswordManagerSettingMigratorServiceFactory::GetForProfile(profile) 1224 PasswordManagerSettingMigratorServiceFactory::GetForProfile(profile)
1227 ->InitializeMigration(ProfileSyncServiceFactory::GetForProfile(profile)); 1225 ->InitializeMigration(ProfileSyncServiceFactory::GetForProfile(profile));
1228 1226
1229 #if defined(OS_ANDROID) 1227 #if defined(OS_ANDROID)
1230 // Service is responsible for fetching content snippets for the NTP. 1228 // Service is responsible for fetching content snippets for the NTP.
1231 ContentSuggestionsServiceFactory::GetForProfile(profile); 1229 ContentSuggestionsServiceFactory::GetForProfile(profile);
1232 NTPSnippetsServiceFactory::GetForProfile(profile);
1233 OfflinePageSuggestionsProviderFactory::GetForProfile(profile);
1234 #endif 1230 #endif
1235 } 1231 }
1236 1232
1237 void ProfileManager::DoFinalInitLogging(Profile* profile) { 1233 void ProfileManager::DoFinalInitLogging(Profile* profile) {
1238 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging"); 1234 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging");
1239 // Count number of extensions in this profile. 1235 // Count number of extensions in this profile.
1240 int enabled_app_count = -1; 1236 int enabled_app_count = -1;
1241 #if defined(ENABLE_EXTENSIONS) 1237 #if defined(ENABLE_EXTENSIONS)
1242 enabled_app_count = GetEnabledAppCount(profile); 1238 enabled_app_count = GetEnabledAppCount(profile);
1243 #endif 1239 #endif
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 1627
1632 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); 1628 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path);
1633 if (!original_callback.is_null()) 1629 if (!original_callback.is_null())
1634 original_callback.Run(loaded_profile, status); 1630 original_callback.Run(loaded_profile, status);
1635 } 1631 }
1636 #endif // !defined(OS_ANDROID) 1632 #endif // !defined(OS_ANDROID)
1637 1633
1638 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1634 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1639 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1635 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1640 } 1636 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698