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

Unified Diff: services/shell/runner/child/test_native_main.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 | « services/shell/public/interfaces/service_manager.mojom ('k') | services/shell/service_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/runner/child/test_native_main.cc
diff --git a/services/shell/runner/child/test_native_main.cc b/services/shell/runner/child/test_native_main.cc
index 763b7eb7c779cff7e67cafbee00859846cec9d78..d1490a35645a8abc476c455b2a39e4abf77d0799 100644
--- a/services/shell/runner/child/test_native_main.cc
+++ b/services/shell/runner/child/test_native_main.cc
@@ -58,11 +58,13 @@ int TestNativeMain(shell::Service* service) {
mojo::edk::SetParentPipeHandleFromCommandLine();
base::MessageLoop loop;
- shell::ServiceContext impl(service,
- shell::GetServiceRequestFromCommandLine());
+ service->set_context(base::WrapUnique(new shell::ServiceContext(
+ service, shell::GetServiceRequestFromCommandLine())));
base::RunLoop().Run();
mojo::edk::ShutdownIPCSupport();
+
+ service->set_context(std::unique_ptr<ServiceContext>());
}
return 0;
« no previous file with comments | « services/shell/public/interfaces/service_manager.mojom ('k') | services/shell/service_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698