From 6c40ccce333577885785d8528d8743df30c254fb Mon Sep 17 00:00:00 2001
From: "kmadhusu@chromium.org"
 <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Mon, 14 Nov 2011 23:52:33 +0000
Subject: Revert 109962 - Revert 109903 - Revert 109898 - Set the profiler's
 thread name at a central place

[I've removed the code, via a separate CL, that DCHECK() earlier today]

This will automatically catch thread names in several of the
child processes we are after, and it also catches the name
for a webkcore thread.

r=rtenneti
Review URL: http://codereview.chromium.org/8558003

TBR=jar@chromium.org
Review URL: http://codereview.chromium.org/8564014

TBR=jar@chromium.org
Review URL: http://codereview.chromium.org/8565030

TBR=jar@chromium.org
Review URL: http://codereview.chromium.org/8555022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109980 0039d316-1c4b-4281-b951-d872f2087c98
---
 base/threading/thread.cc | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'base/threading/thread.cc')

diff --git a/base/threading/thread.cc b/base/threading/thread.cc
index 616aac8..d49f247 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -8,6 +8,7 @@
 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
 #include "base/threading/thread_local.h"
 #include "base/synchronization/waitable_event.h"
+#include "base/tracked_objects.h"
 
 namespace base {
 
@@ -151,6 +152,7 @@ void Thread::ThreadMain() {
     ANNOTATE_THREAD_NAME(name_.c_str());  // Tell the name to race detector.
     message_loop.set_thread_name(name_);
     message_loop_ = &message_loop;
+    tracked_objects::ThreadData::InitializeThreadContext(name_);
 
     // Let the thread do extra initialization.
     // Let's do this before signaling we are started.
-- 
cgit v1.1