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

Side by Side Diff: services/service_manager/standalone/desktop/main_helper.cc

Issue 2557213002: Build services as standalone executables (Closed)
Patch Set: remove DCHECKs with side effects -_- 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 unified diff | Download patch
« no previous file with comments | « services/service_manager/standalone/context.cc ('k') | services/service_manager/switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/standalone/desktop/main_helper.h" 5 #include "services/service_manager/standalone/desktop/main_helper.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/process/launch.h" 13 #include "base/process/launch.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/strings/string_split.h" 15 #include "base/strings/string_split.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "services/service_manager/runner/common/switches.h" 17 #include "services/service_manager/runner/common/switches.h"
18 #include "services/service_manager/runner/host/child_process.h"
19 #include "services/service_manager/runner/init.h" 18 #include "services/service_manager/runner/init.h"
20 #include "services/service_manager/standalone/desktop/launcher_process.h" 19 #include "services/service_manager/standalone/desktop/launcher_process.h"
21 20
22 #if defined(OS_WIN) 21 #if defined(OS_WIN)
23 #include <windows.h> 22 #include <windows.h>
24 #elif (OS_POSIX) 23 #elif (OS_POSIX)
25 #include <unistd.h> 24 #include <unistd.h>
26 #endif 25 #endif
27 26
28 namespace service_manager { 27 namespace service_manager {
29 28
30 int StandaloneServiceManagerMain(int argc, char** argv) { 29 int StandaloneServiceManagerMain(int argc, char** argv) {
31 base::CommandLine::Init(argc, argv); 30 base::CommandLine::Init(argc, argv);
32 const base::CommandLine& command_line =
33 *base::CommandLine::ForCurrentProcess();
34 31
35 base::AtExitManager at_exit; 32 base::AtExitManager at_exit;
36 InitializeLogging(); 33 InitializeLogging();
37 WaitForDebuggerIfNecessary(); 34 WaitForDebuggerIfNecessary();
38 35
39 #if !defined(OFFICIAL_BUILD) && defined(OS_WIN) 36 #if !defined(OFFICIAL_BUILD) && defined(OS_WIN)
40 base::RouteStdioToConsole(false); 37 base::RouteStdioToConsole(false);
41 #endif 38 #endif
42 39
43 if (command_line.HasSwitch(switches::kChildProcess))
44 return ChildProcessMain();
45
46 return LauncherProcessMain(); 40 return LauncherProcessMain();
47 } 41 }
48 42
49 } // namespace service_manager 43 } // namespace service_manager
OLDNEW
« no previous file with comments | « services/service_manager/standalone/context.cc ('k') | services/service_manager/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698