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

Unified Diff: services/service_manager/public/cpp/lib/service.cc

Issue 2700693004: service_manager: More consistent Service lifecycle API (Closed)
Patch Set: . Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: services/service_manager/public/cpp/lib/service.cc
diff --git a/services/service_manager/public/cpp/lib/service.cc b/services/service_manager/public/cpp/lib/service.cc
index 72222efac5352fd48fb510ba9ee9a67fd2418cfe..4348425aa551f7bec9469259de683e2248a27c77 100644
--- a/services/service_manager/public/cpp/lib/service.cc
+++ b/services/service_manager/public/cpp/lib/service.cc
@@ -44,6 +44,8 @@ void Service::OnBindInterface(const ServiceInfo& source_info,
bool Service::OnStop() { return true; }
+void Service::OnStartFailed() {}
+
ServiceContext* Service::context() const {
DCHECK(service_context_)
<< "Service::context() may only be called during or after OnStart().";
@@ -64,6 +66,18 @@ bool ForwardingService::OnConnect(const ServiceInfo& remote_info,
return target_->OnConnect(remote_info, registry);
}
+void ForwardingService::OnBindInterface(
+ const ServiceInfo& remote_info,
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) {
+ target_->OnBindInterface(remote_info, interface_name,
+ std::move(interface_pipe));
+}
+
bool ForwardingService::OnStop() { return target_->OnStop(); }
+void ForwardingService::OnStartFailed() {
+ return target_->OnStartFailed();
+}
+
} // namespace service_manager

Powered by Google App Engine
This is Rietveld 408576698