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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 content::NotificationService::current()->Notify( | 641 content::NotificationService::current()->Notify( |
642 chrome::NOTIFICATION_PROFILE_ADDED, | 642 chrome::NOTIFICATION_PROFILE_ADDED, |
643 content::Source<Profile>(profile), | 643 content::Source<Profile>(profile), |
644 content::NotificationService::NoDetails()); | 644 content::NotificationService::NoDetails()); |
645 | 645 |
646 } | 646 } |
647 | 647 |
648 void ProfileManager::DoFinalInitForServices(Profile* profile, | 648 void ProfileManager::DoFinalInitForServices(Profile* profile, |
649 bool go_off_the_record) { | 649 bool go_off_the_record) { |
650 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 650 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
651 ExtensionSystem::Get(profile)->Init(!go_off_the_record); | 651 extensions::ExtensionSystem::Get(profile)->Init(!go_off_the_record); |
652 // During tests, when |profile| is an instance of TestingProfile, | 652 // During tests, when |profile| is an instance of TestingProfile, |
653 // ExtensionSystem might not create an ExtensionService. | 653 // ExtensionSystem might not create an ExtensionService. |
654 if (ExtensionSystem::Get(profile)->extension_service()) { | 654 if (extensions::ExtensionSystem::Get(profile)->extension_service()) { |
655 profile->GetHostContentSettingsMap()->RegisterExtensionService( | 655 profile->GetHostContentSettingsMap()->RegisterExtensionService( |
656 ExtensionSystem::Get(profile)->extension_service()); | 656 extensions::ExtensionSystem::Get(profile)->extension_service()); |
657 } | 657 } |
658 if (!command_line.HasSwitch(switches::kDisableWebResources)) | 658 if (!command_line.HasSwitch(switches::kDisableWebResources)) |
659 profile->InitPromoResources(); | 659 profile->InitPromoResources(); |
660 } | 660 } |
661 | 661 |
662 void ProfileManager::DoFinalInitLogging(Profile* profile) { | 662 void ProfileManager::DoFinalInitLogging(Profile* profile) { |
663 // Count number of extensions in this profile. | 663 // Count number of extensions in this profile. |
664 int extension_count = -1; | 664 int extension_count = -1; |
665 ExtensionService* extension_service = profile->GetExtensionService(); | 665 ExtensionService* extension_service = profile->GetExtensionService(); |
666 if (extension_service) | 666 if (extension_service) |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, | 986 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, |
987 Profile* profile, | 987 Profile* profile, |
988 Profile::CreateStatus status) { | 988 Profile::CreateStatus status) { |
989 for (size_t i = 0; i < callbacks.size(); ++i) | 989 for (size_t i = 0; i < callbacks.size(); ++i) |
990 callbacks[i].Run(profile, status); | 990 callbacks[i].Run(profile, status); |
991 } | 991 } |
992 | 992 |
993 ProfileManager::ProfileInfo::~ProfileInfo() { | 993 ProfileManager::ProfileInfo::~ProfileInfo() { |
994 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 994 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
995 } | 995 } |
OLD | NEW |