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

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

Issue 2741003: Rename Chrome threads to use a "Cr" prefix. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 6 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 (c) 2009-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009-2010 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 "app/win_util.h" 8 #include "app/win_util.h"
9 #include "chrome/test/injection_test_dll.h" 9 #include "chrome/test/injection_test_dll.h"
10 #include "sandbox/src/sandbox.h" 10 #include "sandbox/src/sandbox.h"
(...skipping 16 matching lines...) Expand all
27 #endif 27 #endif
28 #include "chrome/nacl/nacl_thread.h" 28 #include "chrome/nacl/nacl_thread.h"
29 29
30 #ifdef _WIN64 30 #ifdef _WIN64
31 31
32 // main() routine for the NaCl broker process. 32 // main() routine for the NaCl broker process.
33 // This is necessary for supporting NaCl in Chrome on Win64. 33 // This is necessary for supporting NaCl in Chrome on Win64.
34 int NaClBrokerMain(const MainFunctionParams& parameters) { 34 int NaClBrokerMain(const MainFunctionParams& parameters) {
35 // The main thread of the broker. 35 // The main thread of the broker.
36 MessageLoopForIO main_message_loop; 36 MessageLoopForIO main_message_loop;
37 std::wstring app_name = chrome::kNaClAppName; 37 PlatformThread::SetName("CrNaClBrokerMain");
38 PlatformThread::SetName(WideToASCII(app_name + L"_NaClBrokerMain").c_str());
39 38
40 SystemMonitor system_monitor; 39 SystemMonitor system_monitor;
41 HighResolutionTimerManager hi_res_timer_manager; 40 HighResolutionTimerManager hi_res_timer_manager;
42 41
43 const CommandLine& parsed_command_line = parameters.command_line_; 42 const CommandLine& parsed_command_line = parameters.command_line_;
44 43
45 DLOG(INFO) << "Started NaCL broker with " << 44 DLOG(INFO) << "Started NaCL broker with " <<
46 parsed_command_line.command_line_string(); 45 parsed_command_line.command_line_string();
47 46
48 // NOTE: this code is duplicated from browser_main.cc 47 // NOTE: this code is duplicated from browser_main.cc
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const CommandLine& parsed_command_line = parameters.command_line_; 114 const CommandLine& parsed_command_line = parameters.command_line_;
116 115
117 // This function allows pausing execution using the --nacl-startup-dialog 116 // This function allows pausing execution using the --nacl-startup-dialog
118 // flag allowing us to attach a debugger. 117 // flag allowing us to attach a debugger.
119 // Do not move this function down since that would mean we can't easily debug 118 // Do not move this function down since that would mean we can't easily debug
120 // whatever occurs before it. 119 // whatever occurs before it.
121 HandleNaClTestParameters(parsed_command_line); 120 HandleNaClTestParameters(parsed_command_line);
122 121
123 // The main thread of the plugin services IO. 122 // The main thread of the plugin services IO.
124 MessageLoopForIO main_message_loop; 123 MessageLoopForIO main_message_loop;
125 // NaCl code runs in a different binary on Win64. 124 PlatformThread::SetName("CrNaClMain");
126 #ifdef _WIN64
127 std::wstring app_name = chrome::kNaClAppName;
128 #else
129 std::wstring app_name = chrome::kBrowserAppName;
130 #endif
131 PlatformThread::SetName(WideToASCII(app_name + L"_NaClMain").c_str());
132 125
133 SystemMonitor system_monitor; 126 SystemMonitor system_monitor;
134 HighResolutionTimerManager hi_res_timer_manager; 127 HighResolutionTimerManager hi_res_timer_manager;
135 128
136 #if defined(OS_WIN) 129 #if defined(OS_WIN)
137 sandbox::TargetServices* target_services = 130 sandbox::TargetServices* target_services =
138 parameters.sandbox_info_.TargetServices(); 131 parameters.sandbox_info_.TargetServices();
139 132
140 DLOG(INFO) << "Started NaCl loader with " << 133 DLOG(INFO) << "Started NaCl loader with " <<
141 parsed_command_line.command_line_string(); 134 parsed_command_line.command_line_string();
(...skipping 15 matching lines...) Expand all
157 LaunchNaClChildProcess(); 150 LaunchNaClChildProcess();
158 151
159 #else 152 #else
160 NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc."; 153 NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc.";
161 #endif 154 #endif
162 155
163 return 0; 156 return 0;
164 } 157 }
165 158
166 159
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698