OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/browser/service_manager/service_manager_context.h" | 5 #include "content/browser/service_manager/service_manager_context.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "content/browser/service_manager/common_browser_interfaces.h" | 23 #include "content/browser/service_manager/common_browser_interfaces.h" |
24 #include "content/browser/wake_lock/wake_lock_context_host.h" | 24 #include "content/browser/wake_lock/wake_lock_context_host.h" |
25 #include "content/common/service_manager/service_manager_connection_impl.h" | 25 #include "content/common/service_manager/service_manager_connection_impl.h" |
26 #include "content/grit/content_resources.h" | 26 #include "content/grit/content_resources.h" |
27 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
28 #include "content/public/browser/content_browser_client.h" | 28 #include "content/public/browser/content_browser_client.h" |
29 #include "content/public/browser/gpu_service_registry.h" | 29 #include "content/public/browser/gpu_service_registry.h" |
30 #include "content/public/browser/utility_process_host.h" | 30 #include "content/public/browser/utility_process_host.h" |
31 #include "content/public/browser/utility_process_host_client.h" | 31 #include "content/public/browser/utility_process_host_client.h" |
32 #include "content/public/common/content_client.h" | 32 #include "content/public/common/content_client.h" |
| 33 #include "content/public/common/content_features.h" |
33 #include "content/public/common/content_switches.h" | 34 #include "content/public/common/content_switches.h" |
34 #include "content/public/common/service_manager_connection.h" | 35 #include "content/public/common/service_manager_connection.h" |
35 #include "content/public/common/service_names.mojom.h" | 36 #include "content/public/common/service_names.mojom.h" |
36 #include "media/mojo/features.h" | 37 #include "media/mojo/features.h" |
37 #include "mojo/edk/embedder/embedder.h" | 38 #include "mojo/edk/embedder/embedder.h" |
38 #include "mojo/edk/embedder/incoming_broker_client_invitation.h" | 39 #include "mojo/edk/embedder/incoming_broker_client_invitation.h" |
39 #include "services/catalog/manifest_provider.h" | 40 #include "services/catalog/manifest_provider.h" |
40 #include "services/catalog/public/cpp/manifest_parsing_util.h" | 41 #include "services/catalog/public/cpp/manifest_parsing_util.h" |
41 #include "services/catalog/public/interfaces/constants.mojom.h" | 42 #include "services/catalog/public/interfaces/constants.mojom.h" |
42 #include "services/data_decoder/public/interfaces/constants.mojom.h" | 43 #include "services/data_decoder/public/interfaces/constants.mojom.h" |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 service.first, base::Bind(&StartServiceInUtilityProcess, service.first, | 348 service.first, base::Bind(&StartServiceInUtilityProcess, service.first, |
348 service.second, true /* use_sandbox */)); | 349 service.second, true /* use_sandbox */)); |
349 } | 350 } |
350 | 351 |
351 ContentBrowserClient::OutOfProcessServiceMap unsandboxed_services; | 352 ContentBrowserClient::OutOfProcessServiceMap unsandboxed_services; |
352 GetContentClient() | 353 GetContentClient() |
353 ->browser() | 354 ->browser() |
354 ->RegisterUnsandboxedOutOfProcessServices(&unsandboxed_services); | 355 ->RegisterUnsandboxedOutOfProcessServices(&unsandboxed_services); |
355 | 356 |
356 bool network_service_enabled = | 357 bool network_service_enabled = |
357 base::CommandLine::ForCurrentProcess()->HasSwitch( | 358 base::FeatureList::IsEnabled(features::kNetworkService); |
358 switches::kEnableNetworkService); | |
359 if (network_service_enabled) { | 359 if (network_service_enabled) { |
360 unsandboxed_services.insert( | 360 unsandboxed_services.insert( |
361 std::make_pair(content::mojom::kNetworkServiceName, | 361 std::make_pair(content::mojom::kNetworkServiceName, |
362 base::ASCIIToUTF16("Network Service"))); | 362 base::ASCIIToUTF16("Network Service"))); |
363 } | 363 } |
364 if (base::FeatureList::IsEnabled(video_capture::kMojoVideoCapture)) { | 364 if (base::FeatureList::IsEnabled(video_capture::kMojoVideoCapture)) { |
365 unsandboxed_services.insert( | 365 unsandboxed_services.insert( |
366 std::make_pair(video_capture::mojom::kServiceName, | 366 std::make_pair(video_capture::mojom::kServiceName, |
367 base::ASCIIToUTF16("Video Capture Service"))); | 367 base::ASCIIToUTF16("Video Capture Service"))); |
368 } | 368 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 base::Bind(&DestroyConnectorOnIOThread)); | 418 base::Bind(&DestroyConnectorOnIOThread)); |
419 } | 419 } |
420 | 420 |
421 // static | 421 // static |
422 service_manager::Connector* ServiceManagerContext::GetConnectorForIOThread() { | 422 service_manager::Connector* ServiceManagerContext::GetConnectorForIOThread() { |
423 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 423 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
424 return g_io_thread_connector.Get().get(); | 424 return g_io_thread_connector.Get().get(); |
425 } | 425 } |
426 | 426 |
427 } // namespace content | 427 } // namespace content |
OLD | NEW |