| 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 #include "extensions/browser/renderer_startup_helper.h" | 5 #include "extensions/browser/renderer_startup_helper.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 8 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 9 #include "chrome/common/extensions/extension_messages.h" | 9 #include "chrome/common/extensions/extension_messages.h" |
| 10 #include "chrome/common/extensions/features/feature_channel.h" | 10 #include "chrome/common/extensions/features/feature_channel.h" |
| 11 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 11 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 12 #include "content/public/browser/notification_service.h" | 12 #include "content/public/browser/notification_service.h" |
| 13 #include "content/public/browser/notification_types.h" | 13 #include "content/public/browser/notification_types.h" |
| 14 #include "content/public/browser/render_process_host.h" | 14 #include "content/public/browser/render_process_host.h" |
| 15 #include "extensions/browser/extension_registry.h" | 15 #include "extensions/browser/extension_registry.h" |
| 16 #include "extensions/browser/extensions_browser_client.h" | 16 #include "extensions/browser/extensions_browser_client.h" |
| 17 #include "extensions/common/extension_set.h" | 17 #include "extensions/common/extension_set.h" |
| 18 #include "extensions/common/extensions_client.h" | 18 #include "extensions/common/extensions_client.h" |
| 19 #include "ui/base/webui/web_ui_util.h" | 19 #include "ui/base/webui/web_ui_util.h" |
| 20 | 20 |
| 21 using content::BrowserContext; | 21 using content::BrowserContext; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 RendererStartupHelperFactory::RendererStartupHelperFactory() | 102 RendererStartupHelperFactory::RendererStartupHelperFactory() |
| 103 : BrowserContextKeyedServiceFactory( | 103 : BrowserContextKeyedServiceFactory( |
| 104 "RendererStartupHelper", | 104 "RendererStartupHelper", |
| 105 BrowserContextDependencyManager::GetInstance()) { | 105 BrowserContextDependencyManager::GetInstance()) { |
| 106 // No dependencies on other services. | 106 // No dependencies on other services. |
| 107 } | 107 } |
| 108 | 108 |
| 109 RendererStartupHelperFactory::~RendererStartupHelperFactory() {} | 109 RendererStartupHelperFactory::~RendererStartupHelperFactory() {} |
| 110 | 110 |
| 111 BrowserContextKeyedService* | 111 KeyedService* RendererStartupHelperFactory::BuildServiceInstanceFor( |
| 112 RendererStartupHelperFactory::BuildServiceInstanceFor( | |
| 113 content::BrowserContext* context) const { | 112 content::BrowserContext* context) const { |
| 114 return new RendererStartupHelper(context); | 113 return new RendererStartupHelper(context); |
| 115 } | 114 } |
| 116 | 115 |
| 117 BrowserContext* RendererStartupHelperFactory::GetBrowserContextToUse( | 116 BrowserContext* RendererStartupHelperFactory::GetBrowserContextToUse( |
| 118 BrowserContext* context) const { | 117 BrowserContext* context) const { |
| 119 // Redirected in incognito. | 118 // Redirected in incognito. |
| 120 return ExtensionsBrowserClient::Get()->GetOriginalContext(context); | 119 return ExtensionsBrowserClient::Get()->GetOriginalContext(context); |
| 121 } | 120 } |
| 122 | 121 |
| 123 bool RendererStartupHelperFactory::ServiceIsCreatedWithBrowserContext() const { | 122 bool RendererStartupHelperFactory::ServiceIsCreatedWithBrowserContext() const { |
| 124 return true; | 123 return true; |
| 125 } | 124 } |
| 126 | 125 |
| 127 } // namespace extensions | 126 } // namespace extensions |
| OLD | NEW |