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

Unified Diff: chrome/test/base/mash_browser_tests_main.cc

Issue 2566663004: Revert of Build services as standalone executables (Closed)
Patch Set: Created 4 years 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 | « chrome/app/mash/mash_runner.cc ('k') | chrome/test/base/mojo_test_connector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/mash_browser_tests_main.cc
diff --git a/chrome/test/base/mash_browser_tests_main.cc b/chrome/test/base/mash_browser_tests_main.cc
index 324f99248770c828fbf7f6c67689df430e2975ba..daea62c6426efbf87093fb5a896c624fef96d9f2 100644
--- a/chrome/test/base/mash_browser_tests_main.cc
+++ b/chrome/test/base/mash_browser_tests_main.cc
@@ -24,8 +24,9 @@
#include "services/service_manager/public/cpp/service.h"
#include "services/service_manager/public/cpp/service_context.h"
#include "services/service_manager/public/cpp/service_runner.h"
-#include "services/service_manager/public/cpp/standalone_service/standalone_service.h"
#include "services/service_manager/runner/common/switches.h"
+#include "services/service_manager/runner/host/child_process.h"
+#include "services/service_manager/runner/host/child_process_base.h"
#include "services/service_manager/runner/init.h"
namespace {
@@ -149,8 +150,20 @@
base::AtExitManager exit_manager;
#endif
base::i18n::InitializeICU();
- service_manager::RunStandaloneService(base::Bind(&StartChildApp));
+ service_manager::ChildProcessMainWithCallback(base::Bind(&StartChildApp));
*exit_code = 0;
+ return true;
+ }
+
+ if (command_line.HasSwitch(switches::kChildProcess) &&
+ !command_line.HasSwitch(MojoTestConnector::kTestSwitch)) {
+ base::AtExitManager at_exit;
+ service_manager::InitializeLogging();
+ service_manager::WaitForDebuggerIfNecessary();
+#if !defined(OFFICIAL_BUILD) && defined(OS_WIN)
+ base::RouteStdioToConsole(false);
+#endif
+ *exit_code = service_manager::ChildProcessMain();
return true;
}
« no previous file with comments | « chrome/app/mash/mash_runner.cc ('k') | chrome/test/base/mojo_test_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698