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

Side by Side Diff: chrome/nacl/nacl_main.cc

Issue 7529003: Make base::MessageLoops have names at construction time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make message loop name optional. Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/profile_import/profile_import_main.cc » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 18 matching lines...) Expand all
29 #include "chrome/nacl/broker_thread.h" 29 #include "chrome/nacl/broker_thread.h"
30 #include "sandbox/src/sandbox.h" 30 #include "sandbox/src/sandbox.h"
31 #endif 31 #endif
32 32
33 #ifdef _WIN64 33 #ifdef _WIN64
34 34
35 // main() routine for the NaCl broker process. 35 // main() routine for the NaCl broker process.
36 // This is necessary for supporting NaCl in Chrome on Win64. 36 // This is necessary for supporting NaCl in Chrome on Win64.
37 int NaClBrokerMain(const MainFunctionParams& parameters) { 37 int NaClBrokerMain(const MainFunctionParams& parameters) {
38 // The main thread of the broker. 38 // The main thread of the broker.
39 MessageLoopForIO main_message_loop; 39 MessageLoopForIO main_message_loop("CrNaClBrokerMain");
40 base::PlatformThread::SetName("CrNaClBrokerMain");
41 40
42 base::SystemMonitor system_monitor; 41 base::SystemMonitor system_monitor;
43 HighResolutionTimerManager hi_res_timer_manager; 42 HighResolutionTimerManager hi_res_timer_manager;
44 43
45 const CommandLine& parsed_command_line = parameters.command_line_; 44 const CommandLine& parsed_command_line = parameters.command_line_;
46 45
47 DVLOG(1) << "Started NaCL broker with " 46 DVLOG(1) << "Started NaCL broker with "
48 << parsed_command_line.GetCommandLineString(); 47 << parsed_command_line.GetCommandLineString();
49 48
50 // NOTE: this code is duplicated from browser_main.cc 49 // NOTE: this code is duplicated from browser_main.cc
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 int NaClMain(const MainFunctionParams& parameters) { 92 int NaClMain(const MainFunctionParams& parameters) {
94 const CommandLine& parsed_command_line = parameters.command_line_; 93 const CommandLine& parsed_command_line = parameters.command_line_;
95 94
96 // This function allows pausing execution using the --nacl-startup-dialog 95 // This function allows pausing execution using the --nacl-startup-dialog
97 // flag allowing us to attach a debugger. 96 // flag allowing us to attach a debugger.
98 // Do not move this function down since that would mean we can't easily debug 97 // Do not move this function down since that would mean we can't easily debug
99 // whatever occurs before it. 98 // whatever occurs before it.
100 HandleNaClTestParameters(parsed_command_line); 99 HandleNaClTestParameters(parsed_command_line);
101 100
102 // The main thread of the plugin services IO. 101 // The main thread of the plugin services IO.
103 MessageLoopForIO main_message_loop; 102 MessageLoopForIO main_message_loop("CrNaClMain");
104 base::PlatformThread::SetName("CrNaClMain");
105 103
106 base::SystemMonitor system_monitor; 104 base::SystemMonitor system_monitor;
107 HighResolutionTimerManager hi_res_timer_manager; 105 HighResolutionTimerManager hi_res_timer_manager;
108 106
109 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) 107 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
110 NaClMainPlatformDelegate platform(parameters); 108 NaClMainPlatformDelegate platform(parameters);
111 109
112 platform.PlatformInitialize(); 110 platform.PlatformInitialize();
113 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); 111 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox);
114 platform.InitSandboxTests(no_sandbox); 112 platform.InitSandboxTests(no_sandbox);
(...skipping 13 matching lines...) Expand all
128 // require waiting for a timeout. 126 // require waiting for a timeout.
129 VLOG(1) << "Sandbox test failed: Not launching NaCl process"; 127 VLOG(1) << "Sandbox test failed: Not launching NaCl process";
130 } 128 }
131 #else 129 #else
132 NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc."; 130 NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc.";
133 #endif 131 #endif
134 132
135 platform.PlatformUninitialize(); 133 platform.PlatformUninitialize();
136 return 0; 134 return 0;
137 } 135 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/profile_import/profile_import_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698