Chromium Code Reviews| Index: chrome/browser/chrome_browser_main_mac.mm |
| diff --git a/chrome/browser/chrome_browser_main_mac.mm b/chrome/browser/chrome_browser_main_mac.mm |
| index 1cf2fdb86732eea62879f6416821069c1398b10f..98422a94d64ed5cea4bc1441df00d26f4312f467 100644 |
| --- a/chrome/browser/chrome_browser_main_mac.mm |
| +++ b/chrome/browser/chrome_browser_main_mac.mm |
| @@ -20,6 +20,7 @@ |
| #import "chrome/browser/chrome_browser_application_mac.h" |
| #include "chrome/browser/mac/install_from_dmg.h" |
| #import "chrome/browser/mac/keystone_glue.h" |
| +#include "chrome/browser/mac/mac_startup_profiler.h" |
| #include "chrome/browser/ui/app_list/app_list_service.h" |
| #include "chrome/common/chrome_paths.h" |
| #include "chrome/common/chrome_switches.h" |
| @@ -155,6 +156,7 @@ void RecordCatSixtyFour() { |
| ChromeBrowserMainPartsMac::ChromeBrowserMainPartsMac( |
| const content::MainFunctionParams& parameters) |
| : ChromeBrowserMainPartsPosix(parameters) { |
| + MacStartupProfiler::GetInstance()->RecordLaunchTime(); |
|
jeremy
2014/07/16 08:19:23
Is this recording something different than startu
erikchen
2014/07/16 22:00:33
No. They are functionally equivalent, with the dif
|
| } |
| ChromeBrowserMainPartsMac::~ChromeBrowserMainPartsMac() { |
| @@ -175,6 +177,8 @@ void ChromeBrowserMainPartsMac::PreEarlyInitialization() { |
| } |
| void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() { |
| + MacStartupProfiler::GetInstance()->Profile( |
| + MacStartupProfiler::PRE_MAIN_MESSAGE_LOOP_START); |
| ChromeBrowserMainPartsPosix::PreMainMessageLoopStart(); |
| // Tell Cocoa to finish its initialization, which we want to do manually |
| @@ -257,7 +261,14 @@ void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() { |
| }]; |
| } |
| +void ChromeBrowserMainPartsMac::PostMainMessageLoopStart() { |
| + MacStartupProfiler::GetInstance()->Profile( |
| + MacStartupProfiler::POST_MAIN_MESSAGE_LOOP_START); |
| +} |
| + |
| void ChromeBrowserMainPartsMac::PreProfileInit() { |
| + MacStartupProfiler::GetInstance()->Profile( |
| + MacStartupProfiler::PRE_PROFILE_INIT); |
| ChromeBrowserMainPartsPosix::PreProfileInit(); |
| // This is called here so that the app shim socket is only created after |
| // taking the singleton lock. |
| @@ -266,6 +277,8 @@ void ChromeBrowserMainPartsMac::PreProfileInit() { |
| } |
| void ChromeBrowserMainPartsMac::PostProfileInit() { |
| + MacStartupProfiler::GetInstance()->Profile( |
| + MacStartupProfiler::POST_PROFILE_INIT); |
| ChromeBrowserMainPartsPosix::PostProfileInit(); |
| g_browser_process->metrics_service()->RecordBreakpadRegistration( |
| breakpad::IsCrashReporterEnabled()); |