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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/service_manager/public/c/main.h"
5 #include "base/at_exit.h" 6 #include "base/at_exit.h"
6 #include "base/command_line.h" 7 #include "base/command_line.h"
7 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
8 #include "base/i18n/icu_util.h" 9 #include "base/i18n/icu_util.h"
9 #include "base/logging.h" 10 #include "base/logging.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/process/launch.h" 12 #include "base/process/launch.h"
12 #include "services/service_manager/public/c/main.h" 13 #include "base/task_scheduler/task_scheduler.h"
13 #include "services/service_manager/public/cpp/standalone_service/standalone_serv ice.h" 14 #include "services/service_manager/public/cpp/standalone_service/standalone_serv ice.h"
14 #include "services/service_manager/public/cpp/standalone_service/switches.h" 15 #include "services/service_manager/public/cpp/standalone_service/switches.h"
15 #include "services/service_manager/public/interfaces/service.mojom.h" 16 #include "services/service_manager/public/interfaces/service.mojom.h"
16 #include "services/service_manager/runner/init.h" 17 #include "services/service_manager/runner/init.h"
17 18
18 #if defined(OS_MACOSX) 19 #if defined(OS_MACOSX)
19 #include "base/mac/bundle_locations.h" 20 #include "base/mac/bundle_locations.h"
20 #endif 21 #endif
21 22
22 namespace { 23 namespace {
(...skipping 23 matching lines...) Expand all
46 base::i18n::InitializeICU(); 47 base::i18n::InitializeICU();
47 48
48 #if !defined(OFFICIAL_BUILD) 49 #if !defined(OFFICIAL_BUILD)
49 // Initialize stack dumping before initializing sandbox to make sure symbol 50 // Initialize stack dumping before initializing sandbox to make sure symbol
50 // names in all loaded libraries will be cached. 51 // names in all loaded libraries will be cached.
51 base::debug::EnableInProcessStackDumping(); 52 base::debug::EnableInProcessStackDumping();
52 #endif 53 #endif
53 54
54 service_manager::WaitForDebuggerIfNecessary(); 55 service_manager::WaitForDebuggerIfNecessary();
55 56
57 base::TaskScheduler::CreateAndStartWithDefaultParams("StandaloneService");
58
56 service_manager::RunStandaloneService(base::Bind(&RunServiceMain)); 59 service_manager::RunStandaloneService(base::Bind(&RunServiceMain));
60
61 base::TaskScheduler::GetInstance()->Shutdown();
62
57 return 0; 63 return 0;
58 } 64 }
OLDNEW
« 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