| 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 #include "chrome/utility/chrome_content_utility_client.h" | 5 #include "chrome/utility/chrome_content_utility_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 270 |
| 271 void ChromeContentUtilityClient::ExposeInterfacesToBrowser( | 271 void ChromeContentUtilityClient::ExposeInterfacesToBrowser( |
| 272 service_manager::InterfaceRegistry* registry) { | 272 service_manager::InterfaceRegistry* registry) { |
| 273 #if BUILDFLAG(ENABLE_EXTENSIONS) | 273 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 274 extensions::ExtensionsHandler::ExposeInterfacesToBrowser( | 274 extensions::ExtensionsHandler::ExposeInterfacesToBrowser( |
| 275 registry, utility_process_running_elevated_); | 275 registry, utility_process_running_elevated_); |
| 276 extensions::UtilityHandler::ExposeInterfacesToBrowser( | 276 extensions::UtilityHandler::ExposeInterfacesToBrowser( |
| 277 registry, utility_process_running_elevated_); | 277 registry, utility_process_running_elevated_); |
| 278 #endif | 278 #endif |
| 279 // If our process runs with elevated privileges, only add elevated Mojo | 279 // If our process runs with elevated privileges, only add elevated Mojo |
| 280 // services to the interface registry. | 280 // interfaces to the interface registry. |
| 281 if (utility_process_running_elevated_) | 281 if (utility_process_running_elevated_) |
| 282 return; | 282 return; |
| 283 | 283 |
| 284 registry->AddInterface(base::Bind(&FilePatcherImpl::Create)); | 284 registry->AddInterface(base::Bind(&FilePatcherImpl::Create)); |
| 285 #if !defined(OS_ANDROID) | 285 #if !defined(OS_ANDROID) |
| 286 registry->AddInterface<net::interfaces::ProxyResolverFactory>( | 286 registry->AddInterface<net::interfaces::ProxyResolverFactory>( |
| 287 base::Bind(CreateProxyResolverFactory)); | 287 base::Bind(CreateProxyResolverFactory)); |
| 288 registry->AddInterface(base::Bind(CreateResourceUsageReporter)); | 288 registry->AddInterface(base::Bind(CreateResourceUsageReporter)); |
| 289 registry->AddInterface(base::Bind(&ProfileImportHandler::Create)); | 289 registry->AddInterface(base::Bind(&ProfileImportHandler::Create)); |
| 290 #else | 290 #else |
| (...skipping 18 matching lines...) Expand all Loading... |
| 309 services->insert( | 309 services->insert( |
| 310 std::make_pair(image_decoder::mojom::kServiceName, image_decoder_info)); | 310 std::make_pair(image_decoder::mojom::kServiceName, image_decoder_info)); |
| 311 } | 311 } |
| 312 | 312 |
| 313 // static | 313 // static |
| 314 void ChromeContentUtilityClient::PreSandboxStartup() { | 314 void ChromeContentUtilityClient::PreSandboxStartup() { |
| 315 #if BUILDFLAG(ENABLE_EXTENSIONS) | 315 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 316 extensions::ExtensionsHandler::PreSandboxStartup(); | 316 extensions::ExtensionsHandler::PreSandboxStartup(); |
| 317 #endif | 317 #endif |
| 318 } | 318 } |
| OLD | NEW |