diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 15:58:55 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 15:58:55 +0000 |
commit | cecc93a46dd560fe4157af3d098092eb395324d3 (patch) | |
tree | 18e511cec0772c03f0109bb8a24bd9ad95a4e3fd /chrome/browser/browser_init.cc | |
parent | 07efbd20cead99d9b46df250e6e562bf1696cd4b (diff) | |
download | chromium_src-cecc93a46dd560fe4157af3d098092eb395324d3.zip chromium_src-cecc93a46dd560fe4157af3d098092eb395324d3.tar.gz chromium_src-cecc93a46dd560fe4157af3d098092eb395324d3.tar.bz2 |
Replace Browser::AddTabWithURL(...) with:
- Browser::AddSelectedTabWithURL(const GURL& url, PageTransition::Type transition)
-> A good many callsites just wanted a way to open a tab somewhere and select it.
- Browser::AddTabWithURL(AddTabWithURLParams* params)
-> For the callsites with specialized needs, this new signature allows the parameter set to change as features are added without having to update a bunch of callers every time.
BUG=none
TEST=existing unit tests
Review URL: http://codereview.chromium.org/3599006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61517 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r-- | chrome/browser/browser_init.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index 3e7e440..9f8b171 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -613,7 +613,7 @@ bool BrowserInit::LaunchWithProfile::OpenApplicationWindow(Profile* profile) { ChildProcessSecurityPolicy::GetInstance(); if (policy->IsWebSafeScheme(url.scheme()) || url.SchemeIs(chrome::kFileScheme)) { - Browser::OpenApplicationWindow(profile, url, NULL); + Browser::OpenApplicationWindow(profile, url); return true; } } @@ -757,9 +757,12 @@ Browser* BrowserInit::LaunchWithProfile::OpenTabsInBrowser( add_types |= TabStripModel::ADD_PINNED; int index = browser->GetIndexForInsertionDuringRestore(i); - TabContents* tab = browser->AddTabWithURL( - tabs[i].url, GURL(), PageTransition::START_PAGE, index, add_types, NULL, - tabs[i].app_id, NULL); + Browser::AddTabWithURLParams params(tabs[i].url, + PageTransition::START_PAGE); + params.index = index; + params.add_types = add_types; + params.extension_app_id = tabs[i].app_id; + TabContents* tab = browser->AddTabWithURL(¶ms); if (profile_ && first_tab && process_startup) { AddCrashedInfoBarIfNecessary(tab); |