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

Unified Diff: base/threading/thread.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, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/message_loop.cc ('k') | chrome/browser/browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread.cc
diff --git a/base/threading/thread.cc b/base/threading/thread.cc
index 7a100ca3610f1c29b7e0f1805e7ceef95361ea82..8e929e2a1ba8c481fff7a9d42000c231648ba4b9 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -143,12 +143,11 @@ bool Thread::GetThreadWasQuitProperly() {
void Thread::ThreadMain() {
{
// The message loop for this thread.
- MessageLoop message_loop(startup_data_->options.message_loop_type);
+ MessageLoop message_loop(name_.c_str(),
+ startup_data_->options.message_loop_type);
// Complete the initialization of our Thread object.
thread_id_ = PlatformThread::CurrentId();
- PlatformThread::SetName(name_.c_str());
- ANNOTATE_THREAD_NAME(name_.c_str()); // Tell the name to race detector.
message_loop.set_thread_name(name_);
message_loop_ = &message_loop;
message_loop_proxy_ = MessageLoopProxy::CreateForCurrentThread();
« no previous file with comments | « base/message_loop.cc ('k') | chrome/browser/browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698