Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: mojo/shell/standalone/context.cc

Issue 1775243002: Rename PackageManager->Catalog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@42cpi
Patch Set: . Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/shell/standalone/context.h ('k') | mojo/shell/tests/loader_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "mojo/shell/standalone/context.h" 5 #include "mojo/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 11 matching lines...) Expand all
22 #include "base/strings/string_number_conversions.h" 22 #include "base/strings/string_number_conversions.h"
23 #include "base/strings/string_split.h" 23 #include "base/strings/string_split.h"
24 #include "base/strings/string_util.h" 24 #include "base/strings/string_util.h"
25 #include "base/strings/utf_string_conversions.h" 25 #include "base/strings/utf_string_conversions.h"
26 #include "base/threading/sequenced_worker_pool.h" 26 #include "base/threading/sequenced_worker_pool.h"
27 #include "base/trace_event/trace_event.h" 27 #include "base/trace_event/trace_event.h"
28 #include "build/build_config.h" 28 #include "build/build_config.h"
29 #include "components/tracing/tracing_switches.h" 29 #include "components/tracing/tracing_switches.h"
30 #include "mojo/edk/embedder/embedder.h" 30 #include "mojo/edk/embedder/embedder.h"
31 #include "mojo/public/cpp/bindings/strong_binding.h" 31 #include "mojo/public/cpp/bindings/strong_binding.h"
32 #include "mojo/services/package_manager/package_manager.h" 32 #include "mojo/services/catalog/catalog.h"
33 #include "mojo/services/tracing/public/cpp/switches.h" 33 #include "mojo/services/tracing/public/cpp/switches.h"
34 #include "mojo/services/tracing/public/cpp/trace_provider_impl.h" 34 #include "mojo/services/tracing/public/cpp/trace_provider_impl.h"
35 #include "mojo/services/tracing/public/cpp/tracing_impl.h" 35 #include "mojo/services/tracing/public/cpp/tracing_impl.h"
36 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" 36 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h"
37 #include "mojo/shell/connect_params.h" 37 #include "mojo/shell/connect_params.h"
38 #include "mojo/shell/public/cpp/names.h" 38 #include "mojo/shell/public/cpp/names.h"
39 #include "mojo/shell/runner/host/in_process_native_runner.h" 39 #include "mojo/shell/runner/host/in_process_native_runner.h"
40 #include "mojo/shell/runner/host/out_of_process_native_runner.h" 40 #include "mojo/shell/runner/host/out_of_process_native_runner.h"
41 #include "mojo/shell/standalone/tracer.h" 41 #include "mojo/shell/standalone/tracer.h"
42 #include "mojo/shell/switches.h" 42 #include "mojo/shell/switches.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 << " or don't pass --single-process."; 145 << " or don't pass --single-process.";
146 #endif 146 #endif
147 runner_factory.reset( 147 runner_factory.reset(
148 new InProcessNativeRunnerFactory(blocking_pool_.get())); 148 new InProcessNativeRunnerFactory(blocking_pool_.get()));
149 } else { 149 } else {
150 NativeRunnerDelegate* native_runner_delegate = init_params ? 150 NativeRunnerDelegate* native_runner_delegate = init_params ?
151 init_params->native_runner_delegate : nullptr; 151 init_params->native_runner_delegate : nullptr;
152 runner_factory.reset(new OutOfProcessNativeRunnerFactory( 152 runner_factory.reset(new OutOfProcessNativeRunnerFactory(
153 blocking_pool_.get(), native_runner_delegate)); 153 blocking_pool_.get(), native_runner_delegate));
154 } 154 }
155 scoped_ptr<package_manager::ApplicationCatalogStore> app_catalog; 155 scoped_ptr<catalog::Store> catalog_store;
156 if (init_params) 156 if (init_params)
157 app_catalog = std::move(init_params->app_catalog); 157 catalog_store = std::move(init_params->catalog_store);
158 shell_.reset(new Shell(std::move(runner_factory), blocking_pool_.get(), 158 shell_.reset(new Shell(std::move(runner_factory), blocking_pool_.get(),
159 std::move(app_catalog))); 159 std::move(catalog_store)));
160 160
161 shell::mojom::InterfaceProviderPtr tracing_remote_interfaces; 161 shell::mojom::InterfaceProviderPtr tracing_remote_interfaces;
162 shell::mojom::InterfaceProviderPtr tracing_local_interfaces; 162 shell::mojom::InterfaceProviderPtr tracing_local_interfaces;
163 new TracingInterfaceProvider(&tracer_, GetProxy(&tracing_local_interfaces)); 163 new TracingInterfaceProvider(&tracer_, GetProxy(&tracing_local_interfaces));
164 164
165 scoped_ptr<ConnectParams> params(new ConnectParams); 165 scoped_ptr<ConnectParams> params(new ConnectParams);
166 params->set_source(CreateShellIdentity()); 166 params->set_source(CreateShellIdentity());
167 params->set_target(Identity("mojo:tracing", mojom::kInheritUserID)); 167 params->set_target(Identity("mojo:tracing", mojom::kInheritUserID));
168 params->set_remote_interfaces(GetProxy(&tracing_remote_interfaces)); 168 params->set_remote_interfaces(GetProxy(&tracing_remote_interfaces));
169 params->set_local_interfaces(std::move(tracing_local_interfaces)); 169 params->set_local_interfaces(std::move(tracing_local_interfaces));
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 scoped_ptr<ConnectParams> params(new ConnectParams); 238 scoped_ptr<ConnectParams> params(new ConnectParams);
239 params->set_source(CreateShellIdentity()); 239 params->set_source(CreateShellIdentity());
240 params->set_target(Identity(name, mojom::kRootUserID)); 240 params->set_target(Identity(name, mojom::kRootUserID));
241 params->set_remote_interfaces(GetProxy(&remote_interfaces)); 241 params->set_remote_interfaces(GetProxy(&remote_interfaces));
242 params->set_local_interfaces(std::move(local_interfaces)); 242 params->set_local_interfaces(std::move(local_interfaces));
243 shell_->Connect(std::move(params)); 243 shell_->Connect(std::move(params));
244 } 244 }
245 245
246 } // namespace shell 246 } // namespace shell
247 } // namespace mojo 247 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/standalone/context.h ('k') | mojo/shell/tests/loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698