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

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

Issue 10626007: Move ExtensionSystem into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_
Aaron Boodman 2012/07/03 23:40:55 Could probably do this guy at the same time. He ki
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
11 #include "chrome/browser/profiles/profile_keyed_service_factory.h" 11 #include "chrome/browser/profiles/profile_keyed_service_factory.h"
12 12
13 class ExtensionSystem;
14 class Profile; 13 class Profile;
15 class ProfileKeyedService; 14 class ProfileKeyedService;
16 15
16 namespace extensions {
17 class ExtensionSystem;
18 }
19
17 // ProfileKeyedServiceFactory for ExtensionSystemImpl::Shared. 20 // ProfileKeyedServiceFactory for ExtensionSystemImpl::Shared.
18 // Should not be used except by ExtensionSystem(Factory). 21 // Should not be used except by ExtensionSystem(Factory).
19 class ExtensionSystemSharedFactory : public ProfileKeyedServiceFactory { 22 class ExtensionSystemSharedFactory : public ProfileKeyedServiceFactory {
20 public: 23 public:
21 static ExtensionSystemImpl::Shared* GetForProfile(Profile* profile); 24 static extensions::ExtensionSystemImpl::Shared* GetForProfile(
25 Profile* profile);
22 26
23 static ExtensionSystemSharedFactory* GetInstance(); 27 static ExtensionSystemSharedFactory* GetInstance();
24 28
25 private: 29 private:
26 friend struct DefaultSingletonTraits<ExtensionSystemSharedFactory>; 30 friend struct DefaultSingletonTraits<ExtensionSystemSharedFactory>;
27 31
28 ExtensionSystemSharedFactory(); 32 ExtensionSystemSharedFactory();
29 virtual ~ExtensionSystemSharedFactory(); 33 virtual ~ExtensionSystemSharedFactory();
30 34
31 virtual ProfileKeyedService* BuildServiceInstanceFor( 35 virtual ProfileKeyedService* BuildServiceInstanceFor(
32 Profile* profile) const OVERRIDE; 36 Profile* profile) const OVERRIDE;
33 virtual bool ServiceRedirectedInIncognito() OVERRIDE; 37 virtual bool ServiceRedirectedInIncognito() OVERRIDE;
34 }; 38 };
35 39
36 // ProfileKeyedServiceFactory for ExtensionSystem. 40 // ProfileKeyedServiceFactory for ExtensionSystem.
37 class ExtensionSystemFactory : public ProfileKeyedServiceFactory { 41 class ExtensionSystemFactory : public ProfileKeyedServiceFactory {
38 public: 42 public:
39 // ProfileKeyedServiceFactory implementation: 43 // ProfileKeyedServiceFactory implementation:
40 static ExtensionSystem* GetForProfile(Profile* profile); 44 static extensions::ExtensionSystem* GetForProfile(Profile* profile);
41 45
42 static ExtensionSystemFactory* GetInstance(); 46 static ExtensionSystemFactory* GetInstance();
43 47
44 private: 48 private:
45 friend struct DefaultSingletonTraits<ExtensionSystemFactory>; 49 friend struct DefaultSingletonTraits<ExtensionSystemFactory>;
46 50
47 ExtensionSystemFactory(); 51 ExtensionSystemFactory();
48 virtual ~ExtensionSystemFactory(); 52 virtual ~ExtensionSystemFactory();
49 53
50 virtual ProfileKeyedService* BuildServiceInstanceFor( 54 virtual ProfileKeyedService* BuildServiceInstanceFor(
51 Profile* profile) const OVERRIDE; 55 Profile* profile) const OVERRIDE;
52 virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE; 56 virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
53 virtual bool ServiceIsCreatedWithProfile() OVERRIDE; 57 virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
54 }; 58 };
55 59
56 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_ 60 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698