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

Unified Diff: content/browser/browser_main_runner.cc

Issue 866403008: Profiler-instrumentation of the startup time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using correct method to initialize thread data Created 5 years, 11 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 | « chrome/app/chrome_main.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_runner.cc
diff --git a/content/browser/browser_main_runner.cc b/content/browser/browser_main_runner.cc
index b12ccd6da25c855ea0f831d2373e63d9ff04261f..3c106759d07083863e412a473fed4ecf0d7a2417 100644
--- a/content/browser/browser_main_runner.cc
+++ b/content/browser/browser_main_runner.cc
@@ -10,7 +10,9 @@
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/metrics/statistics_recorder.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/trace_event/trace_event.h"
+#include "base/tracked_objects.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/browser_shutdown_profile_dumper.h"
#include "content/browser/notification_service_impl.h"
@@ -126,6 +128,13 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
}
int Initialize(const MainFunctionParams& parameters) override {
+ // TODO(vadimt): Remove all tracked_objects references below once
+ // crbug.com/453640 is fixed.
+ tracked_objects::ThreadData::InitializeThreadContext("CrBrowserMain");
+
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("BrowserMainRunnerImpl::Initialize"));
+
TRACE_EVENT0("startup", "BrowserMainRunnerImpl::Initialize");
// On Android we normally initialize the browser in a series of UI thread
// tasks. While this is happening a second request can come from the OS or
« no previous file with comments | « chrome/app/chrome_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698