Chromium Code Reviews| 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 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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) |
| 1204 // Service is responsible for fetching content snippets for the NTP. | 1205 // Service is responsible for fetching content snippets for the NTP. |
| 1205 ContentSuggestionsServiceFactory::GetForProfile(profile); | 1206 ContentSuggestionsServiceFactory::GetForProfile(profile); |
| 1207 // Generates notifications from the above, if experiment is enabled. | |
| 1208 ContentSuggestionsNotifierServiceFactory::GetForProfile(profile); | |
|
Elliot Glaysher
2017/01/03 23:21:58
Now that you added ServiceIsCreatedWithBrowserCont
| |
| 1206 #endif | 1209 #endif |
| 1207 } | 1210 } |
| 1208 | 1211 |
| 1209 void ProfileManager::DoFinalInitLogging(Profile* profile) { | 1212 void ProfileManager::DoFinalInitLogging(Profile* profile) { |
| 1210 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging"); | 1213 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging"); |
| 1211 // Count number of extensions in this profile. | 1214 // Count number of extensions in this profile. |
| 1212 int enabled_app_count = -1; | 1215 int enabled_app_count = -1; |
| 1213 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1216 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 1214 enabled_app_count = GetEnabledAppCount(profile); | 1217 enabled_app_count = GetEnabledAppCount(profile); |
| 1215 #endif | 1218 #endif |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1667 | 1670 |
| 1668 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1671 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
| 1669 if (!original_callback.is_null()) | 1672 if (!original_callback.is_null()) |
| 1670 original_callback.Run(loaded_profile, status); | 1673 original_callback.Run(loaded_profile, status); |
| 1671 } | 1674 } |
| 1672 #endif // !defined(OS_ANDROID) | 1675 #endif // !defined(OS_ANDROID) |
| 1673 | 1676 |
| 1674 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1677 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1675 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1678 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1676 } | 1679 } |
| OLD | NEW |