| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "services/shell/standalone/context.h" | 5 #include "services/shell/standalone/context.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 NativeRunnerDelegate* native_runner_delegate = init_params ? | 159 NativeRunnerDelegate* native_runner_delegate = init_params ? |
| 160 init_params->native_runner_delegate : nullptr; | 160 init_params->native_runner_delegate : nullptr; |
| 161 runner_factory.reset(new OutOfProcessNativeRunnerFactory( | 161 runner_factory.reset(new OutOfProcessNativeRunnerFactory( |
| 162 blocking_pool_.get(), native_runner_delegate)); | 162 blocking_pool_.get(), native_runner_delegate)); |
| 163 } | 163 } |
| 164 std::unique_ptr<catalog::Store> store; | 164 std::unique_ptr<catalog::Store> store; |
| 165 if (init_params) | 165 if (init_params) |
| 166 store = std::move(init_params->catalog_store); | 166 store = std::move(init_params->catalog_store); |
| 167 catalog_.reset( | 167 catalog_.reset( |
| 168 new catalog::Catalog(blocking_pool_.get(), std::move(store), nullptr)); | 168 new catalog::Catalog(blocking_pool_.get(), std::move(store), nullptr)); |
| 169 if (!init_params->override_resource_path.empty()) |
| 170 catalog_->set_override_resource_path(init_params->override_resource_path); |
| 169 service_manager_.reset(new ServiceManager(std::move(runner_factory), | 171 service_manager_.reset(new ServiceManager(std::move(runner_factory), |
| 170 catalog_->TakeService())); | 172 catalog_->TakeService())); |
| 171 | 173 |
| 172 mojom::InterfaceProviderPtr tracing_remote_interfaces; | 174 mojom::InterfaceProviderPtr tracing_remote_interfaces; |
| 173 mojom::InterfaceProviderPtr tracing_local_interfaces; | 175 mojom::InterfaceProviderPtr tracing_local_interfaces; |
| 174 mojo::MakeStrongBinding(base::MakeUnique<TracingInterfaceProvider>(&tracer_), | 176 mojo::MakeStrongBinding(base::MakeUnique<TracingInterfaceProvider>(&tracer_), |
| 175 mojo::GetProxy(&tracing_local_interfaces)); | 177 mojo::GetProxy(&tracing_local_interfaces)); |
| 176 | 178 |
| 177 std::unique_ptr<ConnectParams> params(new ConnectParams); | 179 std::unique_ptr<ConnectParams> params(new ConnectParams); |
| 178 params->set_source(CreateServiceManagerIdentity()); | 180 params->set_source(CreateServiceManagerIdentity()); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 mojom::InterfaceProviderPtr local_interfaces; | 255 mojom::InterfaceProviderPtr local_interfaces; |
| 254 | 256 |
| 255 std::unique_ptr<ConnectParams> params(new ConnectParams); | 257 std::unique_ptr<ConnectParams> params(new ConnectParams); |
| 256 params->set_source(CreateServiceManagerIdentity()); | 258 params->set_source(CreateServiceManagerIdentity()); |
| 257 params->set_target(Identity(name, mojom::kRootUserID)); | 259 params->set_target(Identity(name, mojom::kRootUserID)); |
| 258 params->set_remote_interfaces(mojo::GetProxy(&remote_interfaces)); | 260 params->set_remote_interfaces(mojo::GetProxy(&remote_interfaces)); |
| 259 service_manager_->Connect(std::move(params)); | 261 service_manager_->Connect(std::move(params)); |
| 260 } | 262 } |
| 261 | 263 |
| 262 } // namespace shell | 264 } // namespace shell |
| OLD | NEW |