diff options
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index e0cc047..1223101 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1512,8 +1512,14 @@ TabContents* Browser::AddBlankTab(bool foreground) { } TabContents* Browser::AddBlankTabAt(int index, bool foreground) { - return AddTabWithURL(GURL(chrome::kChromeUINewTabURL), GURL(), - PageTransition::TYPED, foreground, index, false, NULL); + // Time new tab page creation time. We keep track of the timing data in + // TabContents, but we want to include the time it takes to create the + // TabContents object too. + base::TimeTicks new_tab_start_time = base::TimeTicks::Now(); + TabContents* tab_contents = AddTabWithURL(GURL(chrome::kChromeUINewTabURL), + GURL(), PageTransition::TYPED, foreground, index, false, NULL); + tab_contents->set_new_tab_start_time(new_tab_start_time); + return tab_contents; } Browser* Browser::CreateNewStripWithContents(TabContents* detached_contents, |