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

Unified Diff: chrome/browser/browser_main.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/threading/thread.cc ('k') | chrome/nacl/nacl_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main.cc
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 4135b020b50dab09215f50a7662bc69c9ab24020..1d2e5a1c91f8c809b955595288d0391967bb7adf 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -25,7 +25,6 @@
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "base/system_monitor/system_monitor.h"
-#include "base/threading/platform_thread.h"
#include "base/threading/thread_restrictions.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
@@ -579,7 +578,8 @@ void BrowserMainParts::SuggestPrefixFieldTrial() {
void BrowserMainParts::MainMessageLoopStart() {
PreMainMessageLoopStart();
- main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI));
+ main_message_loop_.reset(
+ new MessageLoop("CrBrowserMain", MessageLoop::TYPE_UI));
// TODO(viettrungluu): should these really go before setting the thread name?
system_monitor_.reset(new base::SystemMonitor);
@@ -594,10 +594,6 @@ void BrowserMainParts::MainMessageLoopStart() {
}
void BrowserMainParts::InitializeMainThread() {
- const char* kThreadName = "CrBrowserMain";
- base::PlatformThread::SetName(kThreadName);
- main_message_loop().set_thread_name(kThreadName);
-
// Register the main thread by instantiating it, but don't call any methods.
main_thread_.reset(new BrowserThread(BrowserThread::UI,
MessageLoop::current()));
« no previous file with comments | « base/threading/thread.cc ('k') | chrome/nacl/nacl_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698