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

Side by Side Diff: services/service_manager/service_manager.cc

Issue 2427013002: Make tracing work in service manager (Closed)
Patch Set: Rename InitializeWithFactoryLocked to InitializeWithFactoryInternal Created 4 years, 2 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 | « services/service_manager/manifest.json ('k') | services/service_manager/standalone/context.h » ('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 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 "services/service_manager/service_manager.h" 5 #include "services/service_manager/service_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 : native_runner_factory_(std::move(native_runner_factory)), 499 : native_runner_factory_(std::move(native_runner_factory)),
500 weak_ptr_factory_(this) { 500 weak_ptr_factory_(this) {
501 mojom::ServicePtr service; 501 mojom::ServicePtr service;
502 mojom::ServiceRequest request = mojo::GetProxy(&service); 502 mojom::ServiceRequest request = mojo::GetProxy(&service);
503 503
504 InterfaceProviderSpec spec; 504 InterfaceProviderSpec spec;
505 spec.provides[kCapability_ServiceManager].insert( 505 spec.provides[kCapability_ServiceManager].insert(
506 "service_manager::mojom::ServiceManager"); 506 "service_manager::mojom::ServiceManager");
507 spec.requires["*"].insert("service_manager:service_factory"); 507 spec.requires["*"].insert("service_manager:service_factory");
508 spec.requires["service:catalog"].insert("service_manager:resolver"); 508 spec.requires["service:catalog"].insert("service_manager:resolver");
509 spec.requires["service:tracing"].insert("app");
509 510
510 service_manager_instance_ = 511 service_manager_instance_ =
511 CreateInstance(Identity(), CreateServiceManagerIdentity(), spec); 512 CreateInstance(Identity(), CreateServiceManagerIdentity(), spec);
512 service_manager_instance_->StartWithService(std::move(service)); 513 service_manager_instance_->StartWithService(std::move(service));
513 singletons_.insert(kServiceManagerName); 514 singletons_.insert(kServiceManagerName);
514 service_context_.reset(new ServiceContext(this, std::move(request))); 515 service_context_.reset(new ServiceContext(this, std::move(request)));
515 516
516 if (catalog) 517 if (catalog)
517 InitCatalog(std::move(catalog)); 518 InitCatalog(std::move(catalog));
518 } 519 }
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 // Now that the instance has a Service, we can connect to it. 882 // Now that the instance has a Service, we can connect to it.
882 bool connected = instance->ConnectToService(&params); 883 bool connected = instance->ConnectToService(&params);
883 DCHECK(connected); 884 DCHECK(connected);
884 } 885 }
885 886
886 base::WeakPtr<ServiceManager> ServiceManager::GetWeakPtr() { 887 base::WeakPtr<ServiceManager> ServiceManager::GetWeakPtr() {
887 return weak_ptr_factory_.GetWeakPtr(); 888 return weak_ptr_factory_.GetWeakPtr();
888 } 889 }
889 890
890 } // namespace service_manager 891 } // namespace service_manager
OLDNEW
« no previous file with comments | « services/service_manager/manifest.json ('k') | services/service_manager/standalone/context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698