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

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

Issue 2179023004: Make Service own ServiceContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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
« no previous file with comments | « media/mojo/services/mojo_media_application.cc ('k') | services/shell/public/cpp/lib/service_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/lib/service.cc
diff --git a/services/shell/public/cpp/lib/service.cc b/services/shell/public/cpp/lib/service.cc
index 22a167f87fd5d9cac803783afe8c8b036b40aedb..db9eb31d69ff879c190ec8e36be1ac01bfe12ef2 100644
--- a/services/shell/public/cpp/lib/service.cc
+++ b/services/shell/public/cpp/lib/service.cc
@@ -4,14 +4,14 @@
#include "services/shell/public/cpp/service.h"
+#include "services/shell/public/cpp/service_context.h"
+
namespace shell {
Service::Service() {}
Service::~Service() {}
-void Service::OnStart(Connector* connector, const Identity& identity,
- uint32_t id) {
-}
+void Service::OnStart(const Identity& identity) {}
bool Service::OnConnect(Connection* connection) {
return false;
@@ -27,4 +27,16 @@ InterfaceRegistry* Service::GetInterfaceRegistryForConnection() {
return nullptr;
}
+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 shell
« no previous file with comments | « media/mojo/services/mojo_media_application.cc ('k') | services/shell/public/cpp/lib/service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698