OLD | NEW |
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 <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 #endif | 103 #endif |
104 | 104 |
105 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) | 105 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
106 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" | 106 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" |
107 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa
ctory.h" | 107 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa
ctory.h" |
108 #include "chrome/browser/supervised_user/supervised_user_service.h" | 108 #include "chrome/browser/supervised_user/supervised_user_service.h" |
109 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 109 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
110 #endif | 110 #endif |
111 | 111 |
112 #if defined(OS_ANDROID) | 112 #if defined(OS_ANDROID) |
| 113 #include "chrome/browser/ntp_snippets/content_suggestions_notifier_service_facto
ry.h" |
113 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h" | 114 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h" |
114 #endif | 115 #endif |
115 | 116 |
116 #if defined(OS_CHROMEOS) | 117 #if defined(OS_CHROMEOS) |
117 #include "chrome/browser/browser_process_platform_part_chromeos.h" | 118 #include "chrome/browser/browser_process_platform_part_chromeos.h" |
118 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 119 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
119 #include "chromeos/chromeos_switches.h" | 120 #include "chromeos/chromeos_switches.h" |
120 #include "chromeos/dbus/cryptohome_client.h" | 121 #include "chromeos/dbus/cryptohome_client.h" |
121 #include "chromeos/dbus/dbus_thread_manager.h" | 122 #include "chromeos/dbus/dbus_thread_manager.h" |
122 #include "components/user_manager/user.h" | 123 #include "components/user_manager/user.h" |
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 | 1195 |
1195 // Service is responsible for migration of the legacy password manager | 1196 // Service is responsible for migration of the legacy password manager |
1196 // preference which controls behaviour of the Chrome to the new preference | 1197 // preference which controls behaviour of the Chrome to the new preference |
1197 // which controls password management behaviour on Chrome and Android. After | 1198 // which controls password management behaviour on Chrome and Android. After |
1198 // migration will be performed for all users it's planned to remove the | 1199 // migration will be performed for all users it's planned to remove the |
1199 // migration code, rough time estimates are Q1 2016. | 1200 // migration code, rough time estimates are Q1 2016. |
1200 PasswordManagerSettingMigratorServiceFactory::GetForProfile(profile) | 1201 PasswordManagerSettingMigratorServiceFactory::GetForProfile(profile) |
1201 ->InitializeMigration(ProfileSyncServiceFactory::GetForProfile(profile)); | 1202 ->InitializeMigration(ProfileSyncServiceFactory::GetForProfile(profile)); |
1202 | 1203 |
1203 #if defined(OS_ANDROID) | 1204 #if defined(OS_ANDROID) |
| 1205 // TODO(b/678590): create services during profile startup. |
1204 // Service is responsible for fetching content snippets for the NTP. | 1206 // Service is responsible for fetching content snippets for the NTP. |
1205 ContentSuggestionsServiceFactory::GetForProfile(profile); | 1207 ContentSuggestionsServiceFactory::GetForProfile(profile); |
| 1208 // Generates notifications from the above, if experiment is enabled. |
| 1209 ContentSuggestionsNotifierServiceFactory::GetForProfile(profile); |
1206 #endif | 1210 #endif |
1207 } | 1211 } |
1208 | 1212 |
1209 void ProfileManager::DoFinalInitLogging(Profile* profile) { | 1213 void ProfileManager::DoFinalInitLogging(Profile* profile) { |
1210 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging"); | 1214 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging"); |
1211 // Count number of extensions in this profile. | 1215 // Count number of extensions in this profile. |
1212 int enabled_app_count = -1; | 1216 int enabled_app_count = -1; |
1213 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1217 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1214 enabled_app_count = GetEnabledAppCount(profile); | 1218 enabled_app_count = GetEnabledAppCount(profile); |
1215 #endif | 1219 #endif |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1667 | 1671 |
1668 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1672 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
1669 if (!original_callback.is_null()) | 1673 if (!original_callback.is_null()) |
1670 original_callback.Run(loaded_profile, status); | 1674 original_callback.Run(loaded_profile, status); |
1671 } | 1675 } |
1672 #endif // !defined(OS_ANDROID) | 1676 #endif // !defined(OS_ANDROID) |
1673 | 1677 |
1674 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1678 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
1675 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1679 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
1676 } | 1680 } |
OLD | NEW |