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

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

Issue 2581873003: Respond to Connector::Connect when a native service binary fails to launch (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | 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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 CreateServiceWithFactory(factory, target.name(), std::move(request)); 933 CreateServiceWithFactory(factory, target.name(), std::move(request));
934 } else { 934 } else {
935 base::FilePath package_path; 935 base::FilePath package_path;
936 if (!service_overrides_ || !service_overrides_->GetExecutablePathOverride( 936 if (!service_overrides_ || !service_overrides_->GetExecutablePathOverride(
937 target.name(), &package_path)) { 937 target.name(), &package_path)) {
938 package_path = result->package_path; 938 package_path = result->package_path;
939 } 939 }
940 940
941 if (!instance->StartWithFilePath(package_path)) { 941 if (!instance->StartWithFilePath(package_path)) {
942 OnInstanceError(instance); 942 OnInstanceError(instance);
943 if (!params->connect_callback().is_null()) {
944 params->connect_callback().Run(
945 mojom::ConnectResult::INVALID_ARGUMENT, "");
946 }
943 return; 947 return;
944 } 948 }
945 } 949 }
946 } 950 }
947 951
948 // Now that the instance has a Service, we can connect to it. 952 // Now that the instance has a Service, we can connect to it.
949 bool connected = instance->ConnectToService(&params); 953 bool connected = instance->ConnectToService(&params);
950 DCHECK(connected); 954 DCHECK(connected);
951 } 955 }
952 956
953 base::WeakPtr<ServiceManager> ServiceManager::GetWeakPtr() { 957 base::WeakPtr<ServiceManager> ServiceManager::GetWeakPtr() {
954 return weak_ptr_factory_.GetWeakPtr(); 958 return weak_ptr_factory_.GetWeakPtr();
955 } 959 }
956 960
957 } // namespace service_manager 961 } // namespace service_manager
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698