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

Side by Side Diff: chrome/browser/intents/web_intents_registry_factory.cc

Issue 9369013: Take extensions out of Profile into a profile-keyed service, ExtensionSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rerebase Created 8 years, 9 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 "chrome/browser/extensions/extension_system_factory.h"
5 #include "chrome/browser/intents/web_intents_registry.h" 6 #include "chrome/browser/intents/web_intents_registry.h"
6 #include "chrome/browser/intents/web_intents_registry_factory.h" 7 #include "chrome/browser/intents/web_intents_registry_factory.h"
7 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h" 9 #include "chrome/browser/profiles/profile_dependency_manager.h"
9 10
10 // static 11 // static
11 WebIntentsRegistry* WebIntentsRegistryFactory::GetForProfile(Profile* profile) { 12 WebIntentsRegistry* WebIntentsRegistryFactory::GetForProfile(Profile* profile) {
12 return static_cast<WebIntentsRegistry*>( 13 return static_cast<WebIntentsRegistry*>(
13 GetInstance()->GetServiceForProfile(profile, true)); 14 GetInstance()->GetServiceForProfile(profile, true));
14 } 15 }
15 16
16 WebIntentsRegistryFactory::WebIntentsRegistryFactory() 17 WebIntentsRegistryFactory::WebIntentsRegistryFactory()
17 : ProfileKeyedServiceFactory("WebIntentsRegistry", 18 : ProfileKeyedServiceFactory("WebIntentsRegistry",
18 ProfileDependencyManager::GetInstance()) { 19 ProfileDependencyManager::GetInstance()) {
19 // TODO(erg): For Shutdown() order, we need to: 20 // TODO(erg): For Shutdown() order, we need to:
20 // DependsOn(WebDataServiceFactory::GetInstance()); 21 // DependsOn(WebDataServiceFactory::GetInstance());
21 // DependsOn(ExtensionServiceFactory::GetInstance()); 22 DependsOn(ExtensionSystemFactory::GetInstance());
22 } 23 }
23 24
24 WebIntentsRegistryFactory::~WebIntentsRegistryFactory() { 25 WebIntentsRegistryFactory::~WebIntentsRegistryFactory() {
25 } 26 }
26 27
27 // static 28 // static
28 WebIntentsRegistryFactory* WebIntentsRegistryFactory::GetInstance() { 29 WebIntentsRegistryFactory* WebIntentsRegistryFactory::GetInstance() {
29 return Singleton<WebIntentsRegistryFactory>::get(); 30 return Singleton<WebIntentsRegistryFactory>::get();
30 } 31 }
31 32
32 ProfileKeyedService* WebIntentsRegistryFactory::BuildServiceInstanceFor( 33 ProfileKeyedService* WebIntentsRegistryFactory::BuildServiceInstanceFor(
33 Profile* profile) const { 34 Profile* profile) const {
34 WebIntentsRegistry* registry = new WebIntentsRegistry; 35 WebIntentsRegistry* registry = new WebIntentsRegistry;
35 registry->Initialize(profile->GetWebDataService(Profile::EXPLICIT_ACCESS), 36 registry->Initialize(profile->GetWebDataService(Profile::EXPLICIT_ACCESS),
36 profile->GetExtensionService()); 37 profile->GetExtensionService());
37 return registry; 38 return registry;
38 } 39 }
39 40
40 bool WebIntentsRegistryFactory::ServiceRedirectedInIncognito() { 41 bool WebIntentsRegistryFactory::ServiceRedirectedInIncognito() {
41 return false; 42 return false;
42 } 43 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_system.cc ('k') | chrome/browser/profiles/off_the_record_profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698