From ec7182f84a873d646e91c8b15eae4abe3239cd89 Mon Sep 17 00:00:00 2001 From: "jeremy@chromium.org" Date: Thu, 24 Jan 2013 01:32:15 +0000 Subject: Instrument SessionRestore mechanism for slow startups Add UMAs to measure parts of session restore that block loading of the first page, for slow startups. BUG=160927 Review URL: https://chromiumcodereview.appspot.com/12049021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178465 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/sessions/session_service.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chrome/browser/sessions') diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc index b305ca3..7bf8851 100644 --- a/chrome/browser/sessions/session_service.cc +++ b/chrome/browser/sessions/session_service.cc @@ -33,6 +33,7 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/startup_metric_utils.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/notification_details.h" @@ -1005,6 +1006,9 @@ bool SessionService::CreateTabsAndWindows( // still return true and attempt to restore what we we can. VLOG(1) << "CreateTabsAndWindows"; + startup_metric_utils::ScopedSlowStartupUMA + scoped_timer("Startup.SlowStartupSessionServiceCreateTabsAndWindows"); + for (std::vector::const_iterator i = data.begin(); i != data.end(); ++i) { const SessionCommand::id_type kCommandSetWindowBounds2 = 10; -- cgit v1.1