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

Unified Diff: services/service_manager/public/cpp/standalone_service/main.cc

Issue 2876823002: Initialize TaskScheduler in standalone service main. (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/service_manager/public/cpp/standalone_service/main.cc
diff --git a/services/service_manager/public/cpp/standalone_service/main.cc b/services/service_manager/public/cpp/standalone_service/main.cc
index 717fe48188cf787dfd5a57d4ff6cb985613791c5..6d34578a443b1b39af56b91f114b892a91ffc154 100644
--- a/services/service_manager/public/cpp/standalone_service/main.cc
+++ b/services/service_manager/public/cpp/standalone_service/main.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "services/service_manager/public/c/main.h"
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/debug/stack_trace.h"
@@ -9,7 +10,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/process/launch.h"
-#include "services/service_manager/public/c/main.h"
+#include "base/task_scheduler/task_scheduler.h"
#include "services/service_manager/public/cpp/standalone_service/standalone_service.h"
#include "services/service_manager/public/cpp/standalone_service/switches.h"
#include "services/service_manager/public/interfaces/service.mojom.h"
@@ -53,6 +54,11 @@ int main(int argc, char** argv) {
service_manager::WaitForDebuggerIfNecessary();
+ base::TaskScheduler::CreateAndStartWithDefaultParams("StandaloneService");
+
service_manager::RunStandaloneService(base::Bind(&RunServiceMain));
+
+ base::TaskScheduler::GetInstance()->Shutdown();
+
return 0;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698