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

Unified Diff: content/browser/browser_main.cc

Issue 8233037: Update task tracking to not depend on message_loop_ singleton (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/tracked_objects_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main.cc
===================================================================
--- content/browser/browser_main.cc (revision 105693)
+++ content/browser/browser_main.cc (working copy)
@@ -12,6 +12,7 @@
#include "base/metrics/histogram.h"
#include "base/system_monitor/system_monitor.h"
#include "base/threading/thread_restrictions.h"
+#include "base/tracked_objects.h"
#include "content/browser/browser_thread.h"
#include "content/browser/content_browser_client.h"
#include "content/common/hi_res_timer_manager.h"
@@ -241,12 +242,11 @@
main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI));
- // TODO(viettrungluu): should these really go before setting the thread name?
+ InitializeMainThread();
+
system_monitor_.reset(new base::SystemMonitor);
hi_res_timer_manager_.reset(new HighResolutionTimerManager);
- InitializeMainThread();
-
network_change_notifier_.reset(net::NetworkChangeNotifier::Create());
PostMainMessageLoopStart();
@@ -274,6 +274,10 @@
base::PlatformThread::SetName(kThreadName);
main_message_loop().set_thread_name(kThreadName);
+#if defined(TRACK_ALL_TASK_OBJECTS)
+ tracked_objects::ThreadData::InitializeThreadContext(kThreadName);
+#endif // TRACK_ALL_TASK_OBJECTS
+
// 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/tracked_objects_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698