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

Side by Side Diff: chrome/browser/extensions/extension_system_factory.h

Issue 9583036: Revert 124817 - Take extensions out of Profile into a profile-keyed service, ExtensionSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_
7 #pragma once
8
9 #include "base/memory/singleton.h"
10 #include "chrome/browser/extensions/extension_system.h"
11 #include "chrome/browser/profiles/profile_keyed_service_factory.h"
12
13 class ExtensionSystem;
14 class Profile;
15 class ProfileKeyedService;
16
17 // ProfileKeyedServiceFactory for ExtensionSystemImpl::Shared.
18 // Should not be used except by ExtensionSystem(Factory).
19 class ExtensionSystemSharedFactory : public ProfileKeyedServiceFactory {
20 public:
21 static ExtensionSystemImpl::Shared* GetForProfile(Profile* profile);
22
23 static ExtensionSystemSharedFactory* GetInstance();
24
25 private:
26 friend struct DefaultSingletonTraits<ExtensionSystemSharedFactory>;
27
28 ExtensionSystemSharedFactory();
29 virtual ~ExtensionSystemSharedFactory();
30
31 virtual ProfileKeyedService* BuildServiceInstanceFor(
32 Profile* profile) const OVERRIDE;
33 virtual bool ServiceRedirectedInIncognito() OVERRIDE;
34 };
35
36 // ProfileKeyedServiceFactory for ExtensionSystem.
37 class ExtensionSystemFactory : public ProfileKeyedServiceFactory {
38 public:
39 // ProfileKeyedServiceFactory implementation:
40 static ExtensionSystem* GetForProfile(Profile* profile);
41
42 static ExtensionSystemFactory* GetInstance();
43
44 private:
45 friend struct DefaultSingletonTraits<ExtensionSystemFactory>;
46
47 ExtensionSystemFactory();
48 virtual ~ExtensionSystemFactory();
49
50 virtual ProfileKeyedService* BuildServiceInstanceFor(
51 Profile* profile) const OVERRIDE;
52 virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
53 virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
54 };
55
56 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_system.cc ('k') | chrome/browser/extensions/extension_system_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698