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

Side by Side Diff: base/threading/thread.cc

Issue 1124563003: Revert some other possible suspects of a 0.43% size increase of setup.exe: https://build.chromium.o… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « base/threading/simple_thread.cc ('k') | base/threading/thread_id_name_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/threading/thread.h" 5 #include "base/threading/thread.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 if (!startup_data_->options.message_pump_factory.is_null()) { 201 if (!startup_data_->options.message_pump_factory.is_null()) {
202 message_loop.reset( 202 message_loop.reset(
203 new MessageLoop(startup_data_->options.message_pump_factory.Run())); 203 new MessageLoop(startup_data_->options.message_pump_factory.Run()));
204 } else { 204 } else {
205 message_loop.reset( 205 message_loop.reset(
206 new MessageLoop(startup_data_->options.message_loop_type)); 206 new MessageLoop(startup_data_->options.message_loop_type));
207 } 207 }
208 208
209 // Complete the initialization of our Thread object. 209 // Complete the initialization of our Thread object.
210 thread_id_ = PlatformThread::CurrentId(); 210 thread_id_ = PlatformThread::CurrentId();
211 PlatformThread::SetName(name_); 211 PlatformThread::SetName(name_.c_str());
212 ANNOTATE_THREAD_NAME(name_.c_str()); // Tell the name to race detector. 212 ANNOTATE_THREAD_NAME(name_.c_str()); // Tell the name to race detector.
213 message_loop->set_thread_name(name_); 213 message_loop->set_thread_name(name_);
214 message_loop->SetTimerSlack(startup_data_->options.timer_slack); 214 message_loop->SetTimerSlack(startup_data_->options.timer_slack);
215 message_loop_ = message_loop.get(); 215 message_loop_ = message_loop.get();
216 216
217 #if defined(OS_WIN) 217 #if defined(OS_WIN)
218 scoped_ptr<win::ScopedCOMInitializer> com_initializer; 218 scoped_ptr<win::ScopedCOMInitializer> com_initializer;
219 if (com_status_ != NONE) { 219 if (com_status_ != NONE) {
220 com_initializer.reset((com_status_ == STA) ? 220 com_initializer.reset((com_status_ == STA) ?
221 new win::ScopedCOMInitializer() : 221 new win::ScopedCOMInitializer() :
(...skipping 22 matching lines...) Expand all
244 244
245 // Assert that MessageLoop::Quit was called by ThreadQuitHelper. 245 // Assert that MessageLoop::Quit was called by ThreadQuitHelper.
246 DCHECK(GetThreadWasQuitProperly()); 246 DCHECK(GetThreadWasQuitProperly());
247 247
248 // We can't receive messages anymore. 248 // We can't receive messages anymore.
249 message_loop_ = NULL; 249 message_loop_ = NULL;
250 } 250 }
251 } 251 }
252 252
253 } // namespace base 253 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/simple_thread.cc ('k') | base/threading/thread_id_name_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698