OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 EXTENSIONS_BROWSER_RENDERER_STARTUP_HELPER_H_ | 5 #ifndef EXTENSIONS_BROWSER_RENDERER_STARTUP_HELPER_H_ |
6 #define EXTENSIONS_BROWSER_RENDERER_STARTUP_HELPER_H_ | 6 #define EXTENSIONS_BROWSER_RENDERER_STARTUP_HELPER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // Factory for RendererStartupHelpers. Declared here because this header is | 47 // Factory for RendererStartupHelpers. Declared here because this header is |
48 // rarely included and it's probably cheaper to put it here than to make the | 48 // rarely included and it's probably cheaper to put it here than to make the |
49 // compiler generate another object file. | 49 // compiler generate another object file. |
50 class RendererStartupHelperFactory : public BrowserContextKeyedServiceFactory { | 50 class RendererStartupHelperFactory : public BrowserContextKeyedServiceFactory { |
51 public: | 51 public: |
52 static RendererStartupHelper* GetForBrowserContext( | 52 static RendererStartupHelper* GetForBrowserContext( |
53 content::BrowserContext* context); | 53 content::BrowserContext* context); |
54 static RendererStartupHelperFactory* GetInstance(); | 54 static RendererStartupHelperFactory* GetInstance(); |
55 | 55 |
56 private: | 56 private: |
57 friend struct DefaultSingletonTraits<RendererStartupHelperFactory>; | 57 friend struct base::DefaultSingletonTraits<RendererStartupHelperFactory>; |
58 | 58 |
59 RendererStartupHelperFactory(); | 59 RendererStartupHelperFactory(); |
60 ~RendererStartupHelperFactory() override; | 60 ~RendererStartupHelperFactory() override; |
61 | 61 |
62 // BrowserContextKeyedServiceFactory implementation: | 62 // BrowserContextKeyedServiceFactory implementation: |
63 KeyedService* BuildServiceInstanceFor( | 63 KeyedService* BuildServiceInstanceFor( |
64 content::BrowserContext* profile) const override; | 64 content::BrowserContext* profile) const override; |
65 content::BrowserContext* GetBrowserContextToUse( | 65 content::BrowserContext* GetBrowserContextToUse( |
66 content::BrowserContext* context) const override; | 66 content::BrowserContext* context) const override; |
67 bool ServiceIsCreatedWithBrowserContext() const override; | 67 bool ServiceIsCreatedWithBrowserContext() const override; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(RendererStartupHelperFactory); | 69 DISALLOW_COPY_AND_ASSIGN(RendererStartupHelperFactory); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace extensions | 72 } // namespace extensions |
73 | 73 |
74 #endif // EXTENSIONS_BROWSER_RENDERER_STARTUP_HELPER_H_ | 74 #endif // EXTENSIONS_BROWSER_RENDERER_STARTUP_HELPER_H_ |
OLD | NEW |