| Index: chrome/browser/ui/browser_tabstrip.cc
|
| diff --git a/chrome/browser/ui/browser_tabstrip.cc b/chrome/browser/ui/browser_tabstrip.cc
|
| index ba95d584a4e41adb2d820ef399bb52b70cf8ea25..d0bee662f8f6322934f59c0161ece4c2ddc35261 100644
|
| --- a/chrome/browser/ui/browser_tabstrip.cc
|
| +++ b/chrome/browser/ui/browser_tabstrip.cc
|
| @@ -18,21 +18,26 @@
|
|
|
| namespace chrome {
|
|
|
| -void AddBlankTabAt(Browser* browser, int index, bool foreground) {
|
| +void AddURLTabAt(Browser* browser, const GURL& url, int idx, bool foreground) {
|
| // Time new tab page creation time. We keep track of the timing data in
|
| // WebContents, but we want to include the time it takes to create the
|
| // WebContents object too.
|
| base::TimeTicks new_tab_start_time = base::TimeTicks::Now();
|
| - chrome::NavigateParams params(browser, GURL(chrome::kChromeUINewTabURL),
|
| - content::PAGE_TRANSITION_TYPED);
|
| + chrome::NavigateParams params(browser,
|
| + url.is_empty() ? GURL(chrome::kChromeUINewTabURL) : url,
|
| + content::PAGE_TRANSITION_TYPED);
|
| params.disposition = foreground ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
|
| - params.tabstrip_index = index;
|
| + params.tabstrip_index = idx;
|
| chrome::Navigate(¶ms);
|
| CoreTabHelper* core_tab_helper =
|
| CoreTabHelper::FromWebContents(params.target_contents);
|
| core_tab_helper->set_new_tab_start_time(new_tab_start_time);
|
| }
|
|
|
| +void AddBlankTabAt(Browser* browser, int index, bool foreground) {
|
| + AddURLTabAt(browser, GURL(), index, foreground);
|
| +}
|
| +
|
| content::WebContents* AddSelectedTabWithURL(
|
| Browser* browser,
|
| const GURL& url,
|
|
|