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

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

Issue 2427443002: Replace remaining shell references with service manager (Closed)
Patch Set: Created 4 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdio.h> 5 #include <stdio.h>
6 #include <string.h> 6 #include <string.h>
7 7
8 #include <iostream> 8 #include <iostream>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 18 matching lines...) Expand all
29 base::debug::EnableInProcessStackDumping(); 29 base::debug::EnableInProcessStackDumping();
30 #endif 30 #endif
31 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 31 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
32 // http://crbug.com/546644 32 // http://crbug.com/546644
33 command_line->AppendSwitch(switches::kNoSandbox); 33 command_line->AppendSwitch(switches::kNoSandbox);
34 34
35 base::PlatformThread::SetName("mojo_runner"); 35 base::PlatformThread::SetName("mojo_runner");
36 36
37 // We want the Context to outlive the MessageLoop so that pipes are all 37 // We want the Context to outlive the MessageLoop so that pipes are all
38 // gracefully closed / error-out before we try to shut the Context down. 38 // gracefully closed / error-out before we try to shut the Context down.
39 Context shell_context; 39 Context service_manager_context;
40 { 40 {
41 base::MessageLoop message_loop; 41 base::MessageLoop message_loop;
42 CHECK(base::i18n::InitializeICU()); 42 CHECK(base::i18n::InitializeICU());
43 shell_context.Init(nullptr); 43 service_manager_context.Init(nullptr);
44 44
45 message_loop.task_runner()->PostTask( 45 message_loop.task_runner()->PostTask(
46 FROM_HERE, base::Bind(&Context::RunCommandLineApplication, 46 FROM_HERE, base::Bind(&Context::RunCommandLineApplication,
47 base::Unretained(&shell_context))); 47 base::Unretained(&service_manager_context)));
48 48
49 base::RunLoop().Run(); 49 base::RunLoop().Run();
50 50
51 // Must be called before |message_loop| is destroyed. 51 // Must be called before |message_loop| is destroyed.
52 shell_context.Shutdown(); 52 service_manager_context.Shutdown();
53 } 53 }
54 54
55 return 0; 55 return 0;
56 } 56 }
57 57
58 } // namespace service_manager 58 } // namespace service_manager
OLDNEW
« no previous file with comments | « services/service_manager/standalone/context.cc ('k') | services/service_manager/standalone/desktop/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698