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

Unified Diff: services/service_manager/public/cpp/service_test.h

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/service_test.h
diff --git a/services/service_manager/public/cpp/service_test.h b/services/service_manager/public/cpp/service_test.h
index 3d64f4d3201b9833d8e9d519ac6191907ae0e802..d8d38a1541f21e330eefa2c5be199dfd156d4bb1 100644
--- a/services/service_manager/public/cpp/service_test.h
+++ b/services/service_manager/public/cpp/service_test.h
@@ -10,7 +10,6 @@
#include "base/macros.h"
#include "services/service_manager/public/cpp/connector.h"
#include "services/service_manager/public/cpp/service.h"
-#include "services/service_manager/public/cpp/service_context.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
@@ -20,6 +19,7 @@ class MessageLoop;
namespace service_manager {
class BackgroundServiceManager;
+class ServiceContext;
namespace test {
@@ -35,7 +35,9 @@ class ServiceTestClient : public Service {
~ServiceTestClient() override;
protected:
- void OnStart(const ServiceInfo& info) override;
+ void OnStart(ServiceContext* context) override;
+ bool OnConnect(const ServiceInfo& remote_info,
+ InterfaceRegistry* registry) override;
private:
ServiceTest* test_;
@@ -84,11 +86,9 @@ class ServiceTest : public testing::Test {
private:
friend ServiceTestClient;
- std::unique_ptr<Service> service_;
-
+ std::unique_ptr<ServiceContext> context_;
std::unique_ptr<base::MessageLoop> message_loop_;
std::unique_ptr<BackgroundServiceManager> background_service_manager_;
- std::unique_ptr<ServiceContext> service_context_;
// See constructor.
std::string test_name_;
« no previous file with comments | « services/service_manager/public/cpp/service_runner.h ('k') | services/service_manager/runner/child/test_native_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698