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

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

Issue 2476063002: Service Manager: Rework Service and ServiceContext lifetime (Closed)
Patch Set: . Created 4 years, 1 month 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 1cc8f631f96a95185f53bf4f30550650ea26b71d..7d0d72a269cc14988e116a0c9601a763c6c3cfd1 100644
--- a/services/service_manager/public/cpp/lib/service.cc
+++ b/services/service_manager/public/cpp/lib/service.cc
@@ -4,33 +4,12 @@
#include "services/service_manager/public/cpp/service.h"
-#include "services/service_manager/public/cpp/service_context.h"
-#include "services/service_manager/public/cpp/service_info.h"
-
namespace service_manager {
-Service::Service() {}
Service::~Service() {}
-void Service::OnStart(const ServiceInfo& info) {}
-
-bool Service::OnConnect(const ServiceInfo& remote_info,
- InterfaceRegistry* registry) {
- return false;
-}
+void Service::OnStart(ServiceContext* context) {}
bool Service::OnStop() { return true; }
-Connector* Service::connector() {
- return context_->connector();
-}
-
-ServiceContext* Service::context() {
- return context_.get();
-}
-
-void Service::set_context(std::unique_ptr<ServiceContext> context) {
- context_ = std::move(context);
-}
-
} // namespace service_manager

Powered by Google App Engine
This is Rietveld 408576698