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

Side by Side Diff: services/shell/background/background_shell_main.cc

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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/shell/background/background_shell_main.h" 5 #include "services/shell/background/background_shell_main.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/debugger.h" 9 #include "base/debug/debugger.h"
10 #include "base/process/launch.h" 10 #include "base/process/launch.h"
11 #include "services/shell/runner/common/switches.h" 11 #include "services/shell/runner/common/switches.h"
12 #include "services/shell/runner/host/child_process.h" 12 #include "services/shell/runner/host/child_process.h"
13 #include "services/shell/runner/init.h" 13 #include "services/shell/runner/init.h"
14 14
15 namespace mojo {
16 namespace shell { 15 namespace shell {
17 namespace { 16 namespace {
18 17
19 int RunChildProcess() { 18 int RunChildProcess() {
20 base::AtExitManager at_exit; 19 base::AtExitManager at_exit;
21 InitializeLogging(); 20 InitializeLogging();
22 WaitForDebuggerIfNecessary(); 21 WaitForDebuggerIfNecessary();
23 #if !defined(OFFICIAL_BUILD) && defined(OS_WIN) 22 #if !defined(OFFICIAL_BUILD) && defined(OS_WIN)
24 base::RouteStdioToConsole(false); 23 base::RouteStdioToConsole(false);
25 #endif 24 #endif
26 return ChildProcessMain(); 25 return ChildProcessMain();
27 } 26 }
28 27
29 } // namespace 28 } // namespace
30 } // namespace shell 29 } // namespace shell
31 } // namespace mojo
32 30
33 int main(int argc, char** argv) { 31 int main(int argc, char** argv) {
34 base::CommandLine::Init(argc, argv); 32 base::CommandLine::Init(argc, argv);
35 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 33 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
36 switches::kChildProcess)) { 34 switches::kChildProcess)) {
37 return mojo::shell::RunChildProcess(); 35 return shell::RunChildProcess();
38 } 36 }
39 // Reset CommandLine as most likely main() is going to use CommandLine too 37 // Reset CommandLine as most likely main() is going to use CommandLine too
40 // and expect to be able to initialize it. 38 // and expect to be able to initialize it.
41 base::CommandLine::Reset(); 39 base::CommandLine::Reset();
42 return MasterProcessMain(argc, argv); 40 return MasterProcessMain(argc, argv);
43 } 41 }
OLDNEW
« no previous file with comments | « services/shell/background/background_shell.cc ('k') | services/shell/background/tests/background_shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698