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

Unified Diff: services/service_manager/tests/connect/connect_test_class_app.cc

Issue 2500683002: Revert of Service Manager: Remove ServiceContext* arg from Service::OnStart() (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/tests/connect/connect_test_class_app.cc
diff --git a/services/service_manager/tests/connect/connect_test_class_app.cc b/services/service_manager/tests/connect/connect_test_class_app.cc
index 8e19e61125c382dc6772cda4aae360d8f354fb28..b6a731829cfb05d9db5eed96008b961657c39625 100644
--- a/services/service_manager/tests/connect/connect_test_class_app.cc
+++ b/services/service_manager/tests/connect/connect_test_class_app.cc
@@ -33,6 +33,10 @@
private:
// service_manager::Service:
+ void OnStart(ServiceContext* context) override {
+ context_ = context;
+ }
+
bool OnConnect(const ServiceInfo& remote_info,
InterfaceRegistry* registry) override {
registry->AddInterface<test::mojom::ConnectTestService>(this);
@@ -61,7 +65,7 @@
callback.Run("CLASS APP");
}
void GetInstance(const GetInstanceCallback& callback) override {
- callback.Run(context()->identity().instance());
+ callback.Run(context_->identity().instance());
}
// test::mojom::ClassInterface:
@@ -74,9 +78,10 @@
DCHECK(it != inbound_connections_.end());
inbound_connections_.erase(it);
if (inbound_connections_.empty())
- context()->QuitNow();
+ context_->QuitNow();
}
+ ServiceContext* context_ = nullptr;
std::set<InterfaceRegistry*> inbound_connections_;
mojo::BindingSet<test::mojom::ConnectTestService> bindings_;
mojo::BindingSet<test::mojom::ClassInterface> class_interface_bindings_;
« no previous file with comments | « services/service_manager/tests/connect/connect_test_app.cc ('k') | services/service_manager/tests/connect/connect_test_exe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698