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

Side by Side Diff: apps/shell/browser/shell_extension_system_factory.cc

Issue 412713002: Move apps/shell to extensions/shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 40% Created 6 years, 5 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "apps/shell/browser/shell_extension_system_factory.h"
6
7 #include "apps/shell/browser/shell_extension_system.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
9 #include "extensions/browser/extension_prefs_factory.h"
10 #include "extensions/browser/extension_registry_factory.h"
11
12 using content::BrowserContext;
13
14 namespace extensions {
15
16 ExtensionSystem* ShellExtensionSystemFactory::GetForBrowserContext(
17 BrowserContext* context) {
18 return static_cast<ShellExtensionSystem*>(
19 GetInstance()->GetServiceForBrowserContext(context, true));
20 }
21
22 // static
23 ShellExtensionSystemFactory* ShellExtensionSystemFactory::GetInstance() {
24 return Singleton<ShellExtensionSystemFactory>::get();
25 }
26
27 ShellExtensionSystemFactory::ShellExtensionSystemFactory()
28 : ExtensionSystemProvider("ShellExtensionSystem",
29 BrowserContextDependencyManager::GetInstance()) {
30 DependsOn(ExtensionPrefsFactory::GetInstance());
31 DependsOn(ExtensionRegistryFactory::GetInstance());
32 }
33
34 ShellExtensionSystemFactory::~ShellExtensionSystemFactory() {}
35
36 KeyedService* ShellExtensionSystemFactory::BuildServiceInstanceFor(
37 BrowserContext* context) const {
38 return new ShellExtensionSystem(context);
39 }
40
41 BrowserContext* ShellExtensionSystemFactory::GetBrowserContextToUse(
42 BrowserContext* context) const {
43 // Use a separate instance for incognito.
44 return context;
45 }
46
47 bool ShellExtensionSystemFactory::ServiceIsCreatedWithBrowserContext() const {
48 return true;
49 }
50
51 } // namespace extensions
OLDNEW
« no previous file with comments | « apps/shell/browser/shell_extension_system_factory.h ('k') | apps/shell/browser/shell_extension_web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698