| 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 <set> | 5 #include <set> |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 if (extensions::ExtensionSystem::Get(profile)->extension_service()) { | 748 if (extensions::ExtensionSystem::Get(profile)->extension_service()) { |
| 749 profile->GetHostContentSettingsMap()->RegisterExtensionService( | 749 profile->GetHostContentSettingsMap()->RegisterExtensionService( |
| 750 extensions::ExtensionSystem::Get(profile)->extension_service()); | 750 extensions::ExtensionSystem::Get(profile)->extension_service()); |
| 751 } | 751 } |
| 752 } | 752 } |
| 753 #endif | 753 #endif |
| 754 #if defined(ENABLE_MANAGED_USERS) | 754 #if defined(ENABLE_MANAGED_USERS) |
| 755 // Initialization needs to happen after extension system initialization (for | 755 // Initialization needs to happen after extension system initialization (for |
| 756 // extension::ManagementPolicy) and InitProfileUserPrefs (for setting the | 756 // extension::ManagementPolicy) and InitProfileUserPrefs (for setting the |
| 757 // initializing the managed flag if necessary). | 757 // initializing the managed flag if necessary). |
| 758 ManagedUserServiceFactory::GetForProfile(profile)->Init(); | 758 ManagedUserService* managed_user_service = |
| 759 ManagedUserServiceFactory::GetForProfile(profile); |
| 760 if (managed_user_service) |
| 761 managed_user_service->Init(); |
| 759 #endif | 762 #endif |
| 760 } | 763 } |
| 761 | 764 |
| 762 void ProfileManager::DoFinalInitLogging(Profile* profile) { | 765 void ProfileManager::DoFinalInitLogging(Profile* profile) { |
| 763 // Count number of extensions in this profile. | 766 // Count number of extensions in this profile. |
| 764 int extension_count = -1; | 767 int extension_count = -1; |
| 765 #if defined(ENABLE_EXTENSIONS) | 768 #if defined(ENABLE_EXTENSIONS) |
| 766 ExtensionService* extension_service = profile->GetExtensionService(); | 769 ExtensionService* extension_service = profile->GetExtensionService(); |
| 767 if (extension_service) | 770 if (extension_service) |
| 768 extension_count = extension_service->GetAppIds().size(); | 771 extension_count = extension_service->GetAppIds().size(); |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 ProfileManager::ProfileInfo::ProfileInfo( | 1105 ProfileManager::ProfileInfo::ProfileInfo( |
| 1103 Profile* profile, | 1106 Profile* profile, |
| 1104 bool created) | 1107 bool created) |
| 1105 : profile(profile), | 1108 : profile(profile), |
| 1106 created(created) { | 1109 created(created) { |
| 1107 } | 1110 } |
| 1108 | 1111 |
| 1109 ProfileManager::ProfileInfo::~ProfileInfo() { | 1112 ProfileManager::ProfileInfo::~ProfileInfo() { |
| 1110 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 1113 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
| 1111 } | 1114 } |
| OLD | NEW |