OLD | NEW |
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_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_FACTORY_H_ |
6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_FACTORY_H_ | 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_FACTORY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 // Returns the singleton instance of the ProtocolHandlerRegistryFactory. | 22 // Returns the singleton instance of the ProtocolHandlerRegistryFactory. |
23 static ProtocolHandlerRegistryFactory* GetInstance(); | 23 static ProtocolHandlerRegistryFactory* GetInstance(); |
24 | 24 |
25 // Returns the ProtocolHandlerRegistry that provides intent registration for | 25 // Returns the ProtocolHandlerRegistry that provides intent registration for |
26 // |context|. Ownership stays with this factory object. | 26 // |context|. Ownership stays with this factory object. |
27 static ProtocolHandlerRegistry* GetForBrowserContext( | 27 static ProtocolHandlerRegistry* GetForBrowserContext( |
28 content::BrowserContext* context); | 28 content::BrowserContext* context); |
29 | 29 |
30 protected: | 30 protected: |
31 // BrowserContextKeyedServiceFactory implementation. | 31 // BrowserContextKeyedServiceFactory implementation. |
32 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; | 32 virtual bool ServiceIsCreatedWithBrowserContext() const override; |
33 virtual content::BrowserContext* GetBrowserContextToUse( | 33 virtual content::BrowserContext* GetBrowserContextToUse( |
34 content::BrowserContext* context) const OVERRIDE; | 34 content::BrowserContext* context) const override; |
35 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; | 35 virtual bool ServiceIsNULLWhileTesting() const override; |
36 | 36 |
37 private: | 37 private: |
38 friend struct DefaultSingletonTraits<ProtocolHandlerRegistryFactory>; | 38 friend struct DefaultSingletonTraits<ProtocolHandlerRegistryFactory>; |
39 | 39 |
40 ProtocolHandlerRegistryFactory(); | 40 ProtocolHandlerRegistryFactory(); |
41 virtual ~ProtocolHandlerRegistryFactory(); | 41 virtual ~ProtocolHandlerRegistryFactory(); |
42 | 42 |
43 // BrowserContextKeyedServiceFactory implementation. | 43 // BrowserContextKeyedServiceFactory implementation. |
44 virtual KeyedService* BuildServiceInstanceFor( | 44 virtual KeyedService* BuildServiceInstanceFor( |
45 content::BrowserContext* profile) const OVERRIDE; | 45 content::BrowserContext* profile) const override; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistryFactory); | 47 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistryFactory); |
48 }; | 48 }; |
49 | 49 |
50 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_FACTORY_H_ | 50 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_FACTORY_H_ |
OLD | NEW |