diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 18:43:01 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 18:43:01 +0000 |
commit | 4dde6e631c59c5571eb3708beb13f88565b08759 (patch) | |
tree | 3e961bcfd25d87fd926e0fc60ebb6da713610b3b | |
parent | f395404b3b46a8dcc316bd57035dd59539151613 (diff) | |
download | chromium_src-4dde6e631c59c5571eb3708beb13f88565b08759.zip chromium_src-4dde6e631c59c5571eb3708beb13f88565b08759.tar.gz chromium_src-4dde6e631c59c5571eb3708beb13f88565b08759.tar.bz2 |
Rename Chrome threads to use a "Cr" prefix.
Before we carefully used the app (Chrome/Chromium) name, but:
1) these are for internal debugging use only, so why compute this name
2) on Linux the thread ids are limited to 16 characters, and "Chromium"
is too long
Review URL: http://codereview.chromium.org/2741003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49296 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser_main.cc | 9 | ||||
-rw-r--r-- | chrome/gpu/gpu_main.cc | 3 | ||||
-rw-r--r-- | chrome/nacl/nacl_main.cc | 11 | ||||
-rw-r--r-- | chrome/plugin/plugin_main.cc | 3 | ||||
-rw-r--r-- | chrome/profile_import/profile_import_main.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/renderer_main.cc | 3 | ||||
-rw-r--r-- | chrome/service/service_main.cc | 3 | ||||
-rw-r--r-- | chrome/utility/utility_main.cc | 3 | ||||
-rw-r--r-- | chrome/worker/worker_main.cc | 3 | ||||
-rw-r--r-- | media/filters/video_renderer_base.cc | 2 | ||||
-rw-r--r-- | sandbox/src/broker_services.cc | 2 |
11 files changed, 14 insertions, 32 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index bd37e7d..fa58807 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -823,12 +823,9 @@ int BrowserMain(const MainFunctionParams& parameters) { SystemMonitor system_monitor; HighResolutionTimerManager hi_res_timer_manager; - std::wstring app_name = chrome::kBrowserAppName; - std::string thread_name_string = WideToASCII(app_name + L"_BrowserMain"); - - const char* thread_name = thread_name_string.c_str(); - PlatformThread::SetName(thread_name); - main_message_loop.set_thread_name(thread_name); + const char* kThreadName = "CrBrowserMain"; + PlatformThread::SetName(kThreadName); + main_message_loop.set_thread_name(kThreadName); // Register the main thread by instantiating it, but don't call any methods. ChromeThread main_thread(ChromeThread::UI, MessageLoop::current()); diff --git a/chrome/gpu/gpu_main.cc b/chrome/gpu/gpu_main.cc index 86652e5..c6c4aee 100644 --- a/chrome/gpu/gpu_main.cc +++ b/chrome/gpu/gpu_main.cc @@ -35,8 +35,7 @@ int GpuMain(const MainFunctionParams& parameters) { } MessageLoop main_message_loop(MessageLoop::TYPE_UI); - std::wstring app_name = chrome::kBrowserAppName; - PlatformThread::SetName(WideToASCII(app_name + L"_GpuMain").c_str()); + PlatformThread::SetName("CrGpuMain"); #if defined(OS_WIN) win_util::ScopedCOMInitializer com_initializer; diff --git a/chrome/nacl/nacl_main.cc b/chrome/nacl/nacl_main.cc index 4dc2691..760eb85 100644 --- a/chrome/nacl/nacl_main.cc +++ b/chrome/nacl/nacl_main.cc @@ -34,8 +34,7 @@ int NaClBrokerMain(const MainFunctionParams& parameters) { // The main thread of the broker. MessageLoopForIO main_message_loop; - std::wstring app_name = chrome::kNaClAppName; - PlatformThread::SetName(WideToASCII(app_name + L"_NaClBrokerMain").c_str()); + PlatformThread::SetName("CrNaClBrokerMain"); SystemMonitor system_monitor; HighResolutionTimerManager hi_res_timer_manager; @@ -122,13 +121,7 @@ int NaClMain(const MainFunctionParams& parameters) { // The main thread of the plugin services IO. MessageLoopForIO main_message_loop; - // NaCl code runs in a different binary on Win64. -#ifdef _WIN64 - std::wstring app_name = chrome::kNaClAppName; -#else - std::wstring app_name = chrome::kBrowserAppName; -#endif - PlatformThread::SetName(WideToASCII(app_name + L"_NaClMain").c_str()); + PlatformThread::SetName("CrNaClMain"); SystemMonitor system_monitor; HighResolutionTimerManager hi_res_timer_manager; diff --git a/chrome/plugin/plugin_main.cc b/chrome/plugin/plugin_main.cc index f2da7e3..eccdc27 100644 --- a/chrome/plugin/plugin_main.cc +++ b/chrome/plugin/plugin_main.cc @@ -60,8 +60,7 @@ int PluginMain(const MainFunctionParams& parameters) { InitializeChromeApplication(); #endif MessageLoop main_message_loop(MessageLoop::TYPE_UI); - std::wstring app_name = chrome::kBrowserAppName; - PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); + PlatformThread::SetName("CrPluginMain"); SystemMonitor system_monitor; HighResolutionTimerManager high_resolution_timer_manager; diff --git a/chrome/profile_import/profile_import_main.cc b/chrome/profile_import/profile_import_main.cc index 546df18..ced62d5 100644 --- a/chrome/profile_import/profile_import_main.cc +++ b/chrome/profile_import/profile_import_main.cc @@ -16,9 +16,7 @@ int ProfileImportMain(const MainFunctionParams& parameters) { // The main message loop of the profile import process. MessageLoop main_message_loop; - std::wstring app_name = chrome::kBrowserAppName; - PlatformThread::SetName(WideToASCII( - app_name + L"_ProfileImportMain").c_str()); + PlatformThread::SetName("CrProfileImportMain"); ChildProcess profile_import_process; profile_import_process.set_main_thread(new ProfileImportThread()); diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc index 1f77d3e..f521e11 100644 --- a/chrome/renderer/renderer_main.cc +++ b/chrome/renderer/renderer_main.cc @@ -236,8 +236,7 @@ int RendererMain(const MainFunctionParams& parameters) { MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT); #endif - std::wstring app_name = chrome::kBrowserAppName; - PlatformThread::SetName(WideToASCII(app_name + L"_RendererMain").c_str()); + PlatformThread::SetName("CrRendererMain"); SystemMonitor system_monitor; HighResolutionTimerManager hi_res_timer_manager; diff --git a/chrome/service/service_main.cc b/chrome/service/service_main.cc index 8fea68d..35c869b 100644 --- a/chrome/service/service_main.cc +++ b/chrome/service/service_main.cc @@ -15,8 +15,7 @@ // Mainline routine for running as the service process. int ServiceProcessMain(const MainFunctionParams& parameters) { MessageLoopForUI main_message_loop; - std::wstring app_name = chrome::kBrowserAppName; - PlatformThread::SetName(WideToASCII(app_name + L"_ServiceMain").c_str()); + PlatformThread::SetName("CrServiceMain"); ServiceProcess service_process; service_process.Initialize(); diff --git a/chrome/utility/utility_main.cc b/chrome/utility/utility_main.cc index 690d47b1..a568566 100644 --- a/chrome/utility/utility_main.cc +++ b/chrome/utility/utility_main.cc @@ -25,8 +25,7 @@ int UtilityMain(const MainFunctionParams& parameters) { // The main message loop of the utility process. MessageLoop main_message_loop; - std::wstring app_name = chrome::kBrowserAppName; - PlatformThread::SetName(WideToASCII(app_name + L"_UtilityMain").c_str()); + PlatformThread::SetName("CrUtilityMain"); SystemMonitor system_monitor; HighResolutionTimerManager hi_res_timer_manager; diff --git a/chrome/worker/worker_main.cc b/chrome/worker/worker_main.cc index 86b352b..d839760 100644 --- a/chrome/worker/worker_main.cc +++ b/chrome/worker/worker_main.cc @@ -23,8 +23,7 @@ int WorkerMain(const MainFunctionParams& parameters) { // The main message loop of the worker process. MessageLoop main_message_loop; - std::wstring app_name = chrome::kBrowserAppName; - PlatformThread::SetName(WideToASCII(app_name + L"_WorkerMain").c_str()); + PlatformThread::SetName("CrWorkerMain"); SystemMonitor system_monitor; HighResolutionTimerManager hi_res_timer_manager; diff --git a/media/filters/video_renderer_base.cc b/media/filters/video_renderer_base.cc index c689c16..d3c1daa 100644 --- a/media/filters/video_renderer_base.cc +++ b/media/filters/video_renderer_base.cc @@ -213,7 +213,7 @@ bool VideoRendererBase::HasEnded() { // PlatformThread::Delegate implementation. void VideoRendererBase::ThreadMain() { - PlatformThread::SetName("VideoThread"); + PlatformThread::SetName("CrVideoRenderer"); for (;;) { // State and playback rate to assume for this iteration of the loop. State state; diff --git a/sandbox/src/broker_services.cc b/sandbox/src/broker_services.cc index 4382f7e..3b832f6 100644 --- a/sandbox/src/broker_services.cc +++ b/sandbox/src/broker_services.cc @@ -138,7 +138,7 @@ DWORD WINAPI BrokerServicesBase::TargetEventsThread(PVOID param) { if (NULL == param) return 1; - PlatformThread::SetName("BrokerEventThread"); + PlatformThread::SetName("BrokerEvent"); BrokerServicesBase* broker = reinterpret_cast<BrokerServicesBase*>(param); HANDLE port = broker->job_port_; |