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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 content::NotificationService::current()->Notify( | 681 content::NotificationService::current()->Notify( |
682 chrome::NOTIFICATION_PROFILE_ADDED, | 682 chrome::NOTIFICATION_PROFILE_ADDED, |
683 content::Source<Profile>(profile), | 683 content::Source<Profile>(profile), |
684 content::NotificationService::NoDetails()); | 684 content::NotificationService::NoDetails()); |
685 | 685 |
686 } | 686 } |
687 | 687 |
688 void ProfileManager::DoFinalInitForServices(Profile* profile, | 688 void ProfileManager::DoFinalInitForServices(Profile* profile, |
689 bool go_off_the_record) { | 689 bool go_off_the_record) { |
690 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 690 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
691 extensions::ExtensionSystem::Get(profile)->Init(!go_off_the_record); | 691 extensions::ExtensionSystem::Get(profile)->InitForRegularProfile( |
| 692 !go_off_the_record); |
692 // During tests, when |profile| is an instance of TestingProfile, | 693 // During tests, when |profile| is an instance of TestingProfile, |
693 // ExtensionSystem might not create an ExtensionService. | 694 // ExtensionSystem might not create an ExtensionService. |
694 if (extensions::ExtensionSystem::Get(profile)->extension_service()) { | 695 if (extensions::ExtensionSystem::Get(profile)->extension_service()) { |
695 profile->GetHostContentSettingsMap()->RegisterExtensionService( | 696 profile->GetHostContentSettingsMap()->RegisterExtensionService( |
696 extensions::ExtensionSystem::Get(profile)->extension_service()); | 697 extensions::ExtensionSystem::Get(profile)->extension_service()); |
697 } | 698 } |
698 if (!command_line.HasSwitch(switches::kDisableWebResources)) | 699 if (!command_line.HasSwitch(switches::kDisableWebResources)) |
699 profile->InitPromoResources(); | 700 profile->InitPromoResources(); |
700 } | 701 } |
701 | 702 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, | 1030 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, |
1030 Profile* profile, | 1031 Profile* profile, |
1031 Profile::CreateStatus status) { | 1032 Profile::CreateStatus status) { |
1032 for (size_t i = 0; i < callbacks.size(); ++i) | 1033 for (size_t i = 0; i < callbacks.size(); ++i) |
1033 callbacks[i].Run(profile, status); | 1034 callbacks[i].Run(profile, status); |
1034 } | 1035 } |
1035 | 1036 |
1036 ProfileManager::ProfileInfo::~ProfileInfo() { | 1037 ProfileManager::ProfileInfo::~ProfileInfo() { |
1037 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 1038 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
1038 } | 1039 } |
OLD | NEW |