| Index: base/threading/platform_thread_win.cc
|
| diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
|
| index 82981adaf834b7a813cabf40756f4c2d59222ac5..9e877b32f9e1e630ce31c164f5e58680b898e5f7 100644
|
| --- a/base/threading/platform_thread_win.cc
|
| +++ b/base/threading/platform_thread_win.cc
|
| @@ -7,7 +7,7 @@
|
| #include "base/debug/alias.h"
|
| #include "base/debug/profiler.h"
|
| #include "base/logging.h"
|
| -#include "base/threading/thread_local.h"
|
| +#include "base/threading/thread_id_name_manager.h"
|
| #include "base/threading/thread_restrictions.h"
|
| #include "base/tracked_objects.h"
|
|
|
| @@ -17,8 +17,6 @@ namespace base {
|
|
|
| namespace {
|
|
|
| -static ThreadLocalPointer<char> current_thread_name;
|
| -
|
| // The information on how to set the thread name comes from
|
| // a MSDN article: http://msdn2.microsoft.com/en-us/library/xcb2z8hs.aspx
|
| const DWORD kVCThreadNameException = 0x406D1388;
|
| @@ -116,7 +114,7 @@ void PlatformThread::Sleep(TimeDelta duration) {
|
|
|
| // static
|
| void PlatformThread::SetName(const char* name) {
|
| - current_thread_name.Set(const_cast<char*>(name));
|
| + ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
|
|
|
| // On Windows only, we don't need to tell the profiler about the "BrokerEvent"
|
| // thread, as it exists only in the chrome.exe image, and never spawns or runs
|
| @@ -139,7 +137,7 @@ void PlatformThread::SetName(const char* name) {
|
|
|
| // static
|
| const char* PlatformThread::GetName() {
|
| - return current_thread_name.Get();
|
| + return ThreadIdNameManager::GetInstance()->GetName(CurrentId());
|
| }
|
|
|
| // static
|
|
|