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

Side by Side Diff: apps/app_load_service_factory.cc

Issue 441553002: Remove deprecated extension notification from AppLoadService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mistake Created 6 years, 3 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
« no previous file with comments | « apps/app_load_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "apps/app_load_service_factory.h" 5 #include "apps/app_load_service_factory.h"
6 6
7 #include "apps/app_load_service.h" 7 #include "apps/app_load_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 #include "extensions/browser/app_window/app_window_registry.h" 10 #include "extensions/browser/app_window/app_window_registry.h"
11 #include "extensions/browser/extension_prefs_factory.h" 11 #include "extensions/browser/extension_prefs_factory.h"
12 #include "extensions/browser/extension_registry_factory.h"
12 #include "extensions/browser/extension_system_provider.h" 13 #include "extensions/browser/extension_system_provider.h"
13 #include "extensions/browser/extensions_browser_client.h" 14 #include "extensions/browser/extensions_browser_client.h"
14 15
15 namespace apps { 16 namespace apps {
16 17
17 // static 18 // static
18 AppLoadService* AppLoadServiceFactory::GetForProfile(Profile* profile) { 19 AppLoadService* AppLoadServiceFactory::GetForProfile(Profile* profile) {
19 return static_cast<AppLoadService*>( 20 return static_cast<AppLoadService*>(
20 GetInstance()->GetServiceForBrowserContext(profile, true)); 21 GetInstance()->GetServiceForBrowserContext(profile, true));
21 } 22 }
22 23
23 AppLoadServiceFactory* AppLoadServiceFactory::GetInstance() { 24 AppLoadServiceFactory* AppLoadServiceFactory::GetInstance() {
24 return Singleton<AppLoadServiceFactory>::get(); 25 return Singleton<AppLoadServiceFactory>::get();
25 } 26 }
26 27
27 AppLoadServiceFactory::AppLoadServiceFactory() 28 AppLoadServiceFactory::AppLoadServiceFactory()
28 : BrowserContextKeyedServiceFactory( 29 : BrowserContextKeyedServiceFactory(
29 "AppLoadService", 30 "AppLoadService",
30 BrowserContextDependencyManager::GetInstance()) { 31 BrowserContextDependencyManager::GetInstance()) {
32 DependsOn(extensions::AppWindowRegistry::Factory::GetInstance());
33 DependsOn(extensions::ExtensionPrefsFactory::GetInstance());
34 DependsOn(extensions::ExtensionRegistryFactory::GetInstance());
31 DependsOn( 35 DependsOn(
32 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); 36 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
33 DependsOn(extensions::ExtensionPrefsFactory::GetInstance());
34 DependsOn(extensions::AppWindowRegistry::Factory::GetInstance());
35 } 37 }
36 38
37 AppLoadServiceFactory::~AppLoadServiceFactory() { 39 AppLoadServiceFactory::~AppLoadServiceFactory() {
38 } 40 }
39 41
40 KeyedService* AppLoadServiceFactory::BuildServiceInstanceFor( 42 KeyedService* AppLoadServiceFactory::BuildServiceInstanceFor(
41 content::BrowserContext* profile) const { 43 content::BrowserContext* profile) const {
42 return new AppLoadService(static_cast<Profile*>(profile)); 44 return new AppLoadService(static_cast<Profile*>(profile));
43 } 45 }
44 46
45 bool AppLoadServiceFactory::ServiceIsNULLWhileTesting() const { 47 bool AppLoadServiceFactory::ServiceIsNULLWhileTesting() const {
46 return false; 48 return false;
47 } 49 }
48 50
49 bool AppLoadServiceFactory::ServiceIsCreatedWithBrowserContext() const { 51 bool AppLoadServiceFactory::ServiceIsCreatedWithBrowserContext() const {
50 return true; 52 return true;
51 } 53 }
52 54
53 content::BrowserContext* AppLoadServiceFactory::GetBrowserContextToUse( 55 content::BrowserContext* AppLoadServiceFactory::GetBrowserContextToUse(
54 content::BrowserContext* context) const { 56 content::BrowserContext* context) const {
55 // Redirected in incognito. 57 // Redirected in incognito.
56 return extensions::ExtensionsBrowserClient::Get()-> 58 return extensions::ExtensionsBrowserClient::Get()->
57 GetOriginalContext(context); 59 GetOriginalContext(context);
58 } 60 }
59 61
60 } // namespace apps 62 } // namespace apps
OLDNEW
« no previous file with comments | « apps/app_load_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698