Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 10831008: Refactor and fix declarative webRequest API permissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 content::NotificationService::current()->Notify( 664 content::NotificationService::current()->Notify(
665 chrome::NOTIFICATION_PROFILE_ADDED, 665 chrome::NOTIFICATION_PROFILE_ADDED,
666 content::Source<Profile>(profile), 666 content::Source<Profile>(profile),
667 content::NotificationService::NoDetails()); 667 content::NotificationService::NoDetails());
668 668
669 } 669 }
670 670
671 void ProfileManager::DoFinalInitForServices(Profile* profile, 671 void ProfileManager::DoFinalInitForServices(Profile* profile,
672 bool go_off_the_record) { 672 bool go_off_the_record) {
673 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 673 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
674 extensions::ExtensionSystem::Get(profile)->Init(!go_off_the_record); 674 extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(
675 !go_off_the_record);
675 // During tests, when |profile| is an instance of TestingProfile, 676 // During tests, when |profile| is an instance of TestingProfile,
676 // ExtensionSystem might not create an ExtensionService. 677 // ExtensionSystem might not create an ExtensionService.
677 if (extensions::ExtensionSystem::Get(profile)->extension_service()) { 678 if (extensions::ExtensionSystem::Get(profile)->extension_service()) {
678 profile->GetHostContentSettingsMap()->RegisterExtensionService( 679 profile->GetHostContentSettingsMap()->RegisterExtensionService(
679 extensions::ExtensionSystem::Get(profile)->extension_service()); 680 extensions::ExtensionSystem::Get(profile)->extension_service());
680 } 681 }
681 if (!command_line.HasSwitch(switches::kDisableWebResources)) 682 if (!command_line.HasSwitch(switches::kDisableWebResources))
682 profile->InitPromoResources(); 683 profile->InitPromoResources();
683 } 684 }
684 685
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, 1013 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks,
1013 Profile* profile, 1014 Profile* profile,
1014 Profile::CreateStatus status) { 1015 Profile::CreateStatus status) {
1015 for (size_t i = 0; i < callbacks.size(); ++i) 1016 for (size_t i = 0; i < callbacks.size(); ++i)
1016 callbacks[i].Run(profile, status); 1017 callbacks[i].Run(profile, status);
1017 } 1018 }
1018 1019
1019 ProfileManager::ProfileInfo::~ProfileInfo() { 1020 ProfileManager::ProfileInfo::~ProfileInfo() {
1020 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); 1021 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release());
1021 } 1022 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698