summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-05 15:58:55 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-05 15:58:55 +0000
commitcecc93a46dd560fe4157af3d098092eb395324d3 (patch)
tree18e511cec0772c03f0109bb8a24bd9ad95a4e3fd /chrome/browser/task_manager
parent07efbd20cead99d9b46df250e6e562bf1696cd4b (diff)
downloadchromium_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/task_manager')
-rw-r--r--chrome/browser/task_manager/task_manager_browsertest.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/chrome/browser/task_manager/task_manager_browsertest.cc b/chrome/browser/task_manager/task_manager_browsertest.cc
index bce58f6..6544f2f 100644
--- a/chrome/browser/task_manager/task_manager_browsertest.cc
+++ b/chrome/browser/task_manager/task_manager_browsertest.cc
@@ -102,11 +102,10 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeTabContentsChanges) {
// Open a new tab and make sure we notice that.
GURL url(ui_test_utils::GetTestUrl(FilePath(FilePath::kCurrentDirectory),
FilePath(kTitle1File)));
- Browser* browser_used = NULL;
- browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED, 0,
- TabStripModel::ADD_SELECTED, NULL, std::string(),
- &browser_used);
- EXPECT_EQ(browser(), browser_used);
+ Browser::AddTabWithURLParams params(url, PageTransition::TYPED);
+ params.index = 0;
+ browser()->AddTabWithURL(&params);
+ EXPECT_EQ(browser(), params.target);
WaitForResourceChange(3);
// Close the tab and verify that we notice.
@@ -250,9 +249,9 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest,
// Open a new tab and make sure we notice that.
GURL url(ui_test_utils::GetTestUrl(FilePath(FilePath::kCurrentDirectory),
FilePath(kTitle1File)));
- browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED, 0,
- TabStripModel::ADD_SELECTED, NULL, std::string(),
- NULL);
+ Browser::AddTabWithURLParams params(url, PageTransition::TYPED);
+ params.index = 0;
+ browser()->AddTabWithURL(&params);
WaitForResourceChange(3);
// Check that we get some value for the cache columns.