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 <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 #endif | 101 #endif |
| 102 | 102 |
| 103 #if defined(ENABLE_SUPERVISED_USERS) | 103 #if defined(ENABLE_SUPERVISED_USERS) |
| 104 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" | 104 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" |
| 105 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa ctory.h" | 105 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa ctory.h" |
| 106 #include "chrome/browser/supervised_user/supervised_user_service.h" | 106 #include "chrome/browser/supervised_user/supervised_user_service.h" |
| 107 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 107 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
| 108 #endif | 108 #endif |
| 109 | 109 |
| 110 #if defined(OS_ANDROID) | 110 #if defined(OS_ANDROID) |
| 111 #include "chrome/browser/android/chrome_feature_list.h" | |
| 112 #include "chrome/browser/ntp_snippets/ntp_snippets_service_factory.h" | 111 #include "chrome/browser/ntp_snippets/ntp_snippets_service_factory.h" |
| 113 #include "components/ntp_snippets/ntp_snippets_service.h" | 112 #include "components/ntp_snippets/ntp_snippets_service.h" |
| 114 #endif | 113 #endif |
| 115 | 114 |
| 116 #if defined(OS_CHROMEOS) | 115 #if defined(OS_CHROMEOS) |
| 117 #include "chrome/browser/browser_process_platform_part_chromeos.h" | 116 #include "chrome/browser/browser_process_platform_part_chromeos.h" |
| 118 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 117 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 119 #include "chromeos/chromeos_switches.h" | 118 #include "chromeos/chromeos_switches.h" |
| 120 #include "chromeos/dbus/cryptohome_client.h" | 119 #include "chromeos/dbus/cryptohome_client.h" |
| 121 #include "chromeos/dbus/dbus_thread_manager.h" | 120 #include "chromeos/dbus/dbus_thread_manager.h" |
| (...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1223 // Service is responsible for migration of the legacy password manager | 1222 // Service is responsible for migration of the legacy password manager |
| 1224 // preference which controls behaviour of the Chrome to the new preference | 1223 // preference which controls behaviour of the Chrome to the new preference |
| 1225 // which controls password management behaviour on Chrome and Android. After | 1224 // which controls password management behaviour on Chrome and Android. After |
| 1226 // 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 |
| 1227 // migration code, rough time estimates are Q1 2016. | 1226 // migration code, rough time estimates are Q1 2016. |
| 1228 PasswordManagerSettingMigratorServiceFactory::GetForProfile(profile) | 1227 PasswordManagerSettingMigratorServiceFactory::GetForProfile(profile) |
| 1229 ->InitializeMigration(ProfileSyncServiceFactory::GetForProfile(profile)); | 1228 ->InitializeMigration(ProfileSyncServiceFactory::GetForProfile(profile)); |
| 1230 | 1229 |
| 1231 #if defined(OS_ANDROID) | 1230 #if defined(OS_ANDROID) |
| 1232 // Service is responsible for fetching content snippets for the NTP. | 1231 // Service is responsible for fetching content snippets for the NTP. |
| 1233 // Note: Create the service even if the feature is disabled, so that any | 1232 // Note: Create the service even if the feature is disabled, so that any |
|
Michael van Ouwerkerk
2016/05/20 12:38:36
Marc, I don't understand this comment. Could you m
Marc Treib
2016/05/20 13:49:36
When the service is instantiated and enabled, it s
| |
| 1234 // remaining tasks will be cleaned up. | 1233 // remaining tasks will be cleaned up. |
| 1235 NTPSnippetsServiceFactory::GetForProfile(profile)->Init( | 1234 NTPSnippetsServiceFactory::GetForProfile(profile)->Init(); |
|
noyau (Ping after 24h)
2016/05/20 15:16:53
Here the service is created and Init is called rig
noyau (Ping after 24h)
2016/05/24 14:19:11
Ping!
Michael van Ouwerkerk
2016/05/24 14:38:54
I don't know exactly why. It's possible some of th
Michael van Ouwerkerk
2016/05/24 14:38:54
Done.
Bernhard Bauer
2016/05/24 14:54:28
The reason why this is here is because we need to
Michael van Ouwerkerk
2016/05/24 15:00:45
I just moved everything to the constructor, I expe
| |
| 1236 base::FeatureList::IsEnabled(chrome::android::kNTPSnippetsFeature)); | |
| 1237 #endif | 1235 #endif |
| 1238 } | 1236 } |
| 1239 | 1237 |
| 1240 void ProfileManager::DoFinalInitLogging(Profile* profile) { | 1238 void ProfileManager::DoFinalInitLogging(Profile* profile) { |
| 1241 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging"); | 1239 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging"); |
| 1242 // Count number of extensions in this profile. | 1240 // Count number of extensions in this profile. |
| 1243 int enabled_app_count = -1; | 1241 int enabled_app_count = -1; |
| 1244 #if defined(ENABLE_EXTENSIONS) | 1242 #if defined(ENABLE_EXTENSIONS) |
| 1245 enabled_app_count = GetEnabledAppCount(profile); | 1243 enabled_app_count = GetEnabledAppCount(profile); |
| 1246 #endif | 1244 #endif |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1640 | 1638 |
| 1641 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1639 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
| 1642 if (!original_callback.is_null()) | 1640 if (!original_callback.is_null()) |
| 1643 original_callback.Run(loaded_profile, status); | 1641 original_callback.Run(loaded_profile, status); |
| 1644 } | 1642 } |
| 1645 #endif // !defined(OS_ANDROID) | 1643 #endif // !defined(OS_ANDROID) |
| 1646 | 1644 |
| 1647 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1645 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1648 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1646 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1649 } | 1647 } |
| OLD | NEW |