summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/app_controller_mac.mm2
-rw-r--r--chrome/browser/chromeos/network_message_observer.cc2
-rw-r--r--chrome/browser/ui/browser.cc35
-rw-r--r--chrome/browser/ui/browser.h15
-rw-r--r--chrome/browser/ui/browser_navigator.cc12
-rw-r--r--chrome/browser/ui/browser_navigator.h14
-rw-r--r--chrome/browser/ui/browser_navigator_browsertest.cc55
-rw-r--r--chrome/browser/ui/browser_navigator_browsertest_chromeos.cc2
-rw-r--r--chrome/browser/ui/toolbar/back_forward_menu_model.cc2
-rw-r--r--chrome/browser/ui/webui/bug_report_ui.cc2
-rw-r--r--chrome/common/url_constants.h1
-rw-r--r--content/browser/renderer_host/render_process_host_browsertest.cc16
12 files changed, 103 insertions, 55 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index ec0fe15..9d0e5a0a0 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -1135,7 +1135,7 @@ void RecordLastRunAppBundlePath() {
if (!parsed_command_line.HasSwitch(switches::kDisableTabbedOptions)) {
if (Browser* browser = ActivateBrowser([self defaultProfile])) {
// Show options tab in the active browser window.
- browser->ShowOptionsTab(chrome::kDefaultOptionsSubPage);
+ browser->OpenOptionsDialog();
} else {
// No browser window, so create one for the options tab.
Browser::OpenOptionsWindow([self defaultProfile]);
diff --git a/chrome/browser/chromeos/network_message_observer.cc b/chrome/browser/chromeos/network_message_observer.cc
index 986a680..c8c8b87 100644
--- a/chrome/browser/chromeos/network_message_observer.cc
+++ b/chrome/browser/chromeos/network_message_observer.cc
@@ -96,7 +96,7 @@ void NetworkMessageObserver::OpenMoreInfoPage(const ListValue* args) {
const chromeos::CellularNetwork* cellular = lib->cellular_network();
if (!cellular)
return;
- browser->ShowSingletonTab(GURL(cellular->payment_url()), false);
+ browser->ShowSingletonTab(GURL(cellular->payment_url()));
}
void NetworkMessageObserver::InitNewPlan(const CellularDataPlan* plan) {
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 66c99a2..6d60411 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -66,7 +66,6 @@
#include "chrome/browser/sync/sync_ui_util.h"
#include "chrome/browser/tab_closeable_state_watcher.h"
#include "chrome/browser/tabs/tab_strip_model.h"
-#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/find_bar/find_bar.h"
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/browser/ui/find_bar/find_tab_helper.h"
@@ -694,7 +693,7 @@ void Browser::OpenHelpWindow(Profile* profile) {
// static
void Browser::OpenOptionsWindow(Profile* profile) {
Browser* browser = Browser::Create(profile);
- browser->ShowOptionsTab(chrome::kDefaultOptionsSubPage);
+ browser->OpenOptionsDialog();
browser->window()->Show();
}
@@ -1093,11 +1092,16 @@ bool Browser::NavigateToIndexWithDisposition(int index,
return true;
}
-void Browser::ShowSingletonTab(const GURL& url, bool ignore_path) {
+browser::NavigateParams Browser::GetSingletonTabNavigateParams(
+ const GURL& url) {
browser::NavigateParams params(this, url, PageTransition::AUTO_BOOKMARK);
params.disposition = SINGLETON_TAB;
params.show_window = true;
- params.ignore_path = ignore_path;
+ return params;
+}
+
+void Browser::ShowSingletonTab(const GURL& url) {
+ browser::NavigateParams params(GetSingletonTabNavigateParams(url));
browser::Navigate(&params);
}
@@ -1804,27 +1808,27 @@ void Browser::ShowAppMenu() {
void Browser::ShowBookmarkManagerTab() {
UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks"), profile_);
- ShowSingletonTab(GURL(chrome::kChromeUIBookmarksURL), false);
+ ShowSingletonTab(GURL(chrome::kChromeUIBookmarksURL));
}
void Browser::ShowHistoryTab() {
UserMetrics::RecordAction(UserMetricsAction("ShowHistory"), profile_);
- ShowSingletonTab(GURL(chrome::kChromeUIHistoryURL), false);
+ ShowSingletonTab(GURL(chrome::kChromeUIHistoryURL));
}
void Browser::ShowDownloadsTab() {
UserMetrics::RecordAction(UserMetricsAction("ShowDownloads"), profile_);
- ShowSingletonTab(GURL(chrome::kChromeUIDownloadsURL), false);
+ ShowSingletonTab(GURL(chrome::kChromeUIDownloadsURL));
}
void Browser::ShowExtensionsTab() {
UserMetrics::RecordAction(UserMetricsAction("ShowExtensions"), profile_);
- ShowSingletonTab(GURL(chrome::kChromeUIExtensionsURL), false);
+ ShowSingletonTab(GURL(chrome::kChromeUIExtensionsURL));
}
void Browser::ShowAboutConflictsTab() {
UserMetrics::RecordAction(UserMetricsAction("AboutConflicts"), profile_);
- ShowSingletonTab(GURL(chrome::kChromeUIConflictsURL), false);
+ ShowSingletonTab(GURL(chrome::kChromeUIConflictsURL));
}
void Browser::ShowBrokenPageTab(TabContents* contents) {
@@ -1839,12 +1843,14 @@ void Browser::ShowBrokenPageTab(TabContents* contents) {
subst.push_back(page_url);
std::string report_page_url =
ReplaceStringPlaceholders(kBrokenPageUrl, subst, NULL);
- ShowSingletonTab(GURL(report_page_url), false);
+ ShowSingletonTab(GURL(report_page_url));
}
void Browser::ShowOptionsTab(const std::string& sub_page) {
GURL url(chrome::kChromeUISettingsURL + sub_page);
- ShowSingletonTab(url, true);
+ browser::NavigateParams params(GetSingletonTabNavigateParams(url));
+ params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE;
+ browser::Navigate(&params);
}
void Browser::OpenClearBrowsingDataDialog() {
@@ -1862,7 +1868,10 @@ void Browser::OpenOptionsDialog() {
UserMetrics::RecordAction(UserMetricsAction("ShowOptions"), profile_);
if (!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableTabbedOptions)) {
- ShowOptionsTab(chrome::kDefaultOptionsSubPage);
+ GURL url(chrome::kChromeUISettingsURL);
+ browser::NavigateParams params(GetSingletonTabNavigateParams(url));
+ params.path_behavior = browser::NavigateParams::IGNORE_AND_STAY_PUT;
+ browser::Navigate(&params);
} else {
ShowOptionsWindow(OPTIONS_PAGE_DEFAULT, OPTIONS_GROUP_NONE, profile_);
}
@@ -1900,7 +1909,7 @@ void Browser::OpenSyncMyBookmarksDialog() {
void Browser::OpenAboutChromeDialog() {
UserMetrics::RecordAction(UserMetricsAction("AboutChrome"), profile_);
#if defined(OS_CHROMEOS)
- ShowSingletonTab(GURL(chrome::kChromeUIAboutURL), false);
+ ShowSingletonTab(GURL(chrome::kChromeUIAboutURL));
#else
window_->ShowAboutChromeDialog();
#endif
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index e7df332..1430cce 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -25,10 +25,11 @@
#include "chrome/browser/sessions/tab_restore_service_observer.h"
#include "chrome/browser/sync/profile_sync_service_observer.h"
#include "chrome/browser/tabs/tab_handler.h"
-#include "chrome/browser/tabs/tab_strip_model_delegate.h" // TODO(beng): remove
-#include "chrome/browser/tabs/tab_strip_model_observer.h" // TODO(beng): remove
+#include "chrome/browser/tabs/tab_strip_model_delegate.h" // TODO(beng): remove
+#include "chrome/browser/tabs/tab_strip_model_observer.h" // TODO(beng): remove
#include "chrome/browser/tab_contents/page_navigator.h"
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
+#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h"
#include "chrome/browser/ui/shell_dialogs.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h"
@@ -425,9 +426,8 @@ class Browser : public TabHandlerDelegate,
// Show a given a URL. If a tab with the same URL (ignoring the ref) is
// already visible in this browser, it becomes selected. Otherwise a new tab
- // is created. If |ignore_path| is true, the paths of the URLs are ignored
- // when locating the singleton tab.
- void ShowSingletonTab(const GURL& url, bool ignore_path);
+ // is created.
+ void ShowSingletonTab(const GURL& url);
// Update commands whose state depends on whether the window is in fullscreen
// mode. This is a public function because on Linux, fullscreen mode is an
@@ -490,7 +490,7 @@ class Browser : public TabHandlerDelegate,
// in |SupportsWindowFeature| for details on this.
bool CanSupportWindowFeature(WindowFeature feature) const;
-// TODO(port): port these, and re-merge the two function declaration lists.
+ // TODO(port): port these, and re-merge the two function declaration lists.
// Page-related commands.
void Print();
void EmailPageLocation();
@@ -1006,6 +1006,9 @@ class Browser : public TabHandlerDelegate,
// Opens view-source tab for given tab contents.
void ViewSource(TabContentsWrapper* tab);
+ // Creates a NavigateParams struct for a singleton tab navigation.
+ browser::NavigateParams GetSingletonTabNavigateParams(const GURL& url);
+
// Data members /////////////////////////////////////////////////////////////
NotificationRegistrar registrar_;
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 82803f9..496a29e 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -103,7 +103,8 @@ int GetIndexOfSingletonTab(browser::NavigateParams* params) {
url_canon::Replacements<char> replacements;
replacements.ClearRef();
- if (params->ignore_path) {
+ if (params->path_behavior == browser::NavigateParams::IGNORE_AND_NAVIGATE ||
+ params->path_behavior == browser::NavigateParams::IGNORE_AND_STAY_PUT) {
replacements.ClearPath();
replacements.ClearQuery();
}
@@ -340,7 +341,7 @@ NavigateParams::NavigateParams(
tabstrip_index(-1),
tabstrip_add_types(TabStripModel::ADD_SELECTED),
show_window(false),
- ignore_path(false),
+ path_behavior(RESPECT),
browser(a_browser),
profile(NULL) {
}
@@ -354,7 +355,7 @@ NavigateParams::NavigateParams(Browser* a_browser,
tabstrip_index(-1),
tabstrip_add_types(TabStripModel::ADD_SELECTED),
show_window(false),
- ignore_path(false),
+ path_behavior(RESPECT),
browser(a_browser),
profile(NULL) {
}
@@ -478,9 +479,8 @@ void Navigate(NavigateParams* params) {
if (singleton_index >= 0) {
TabContents* target = params->browser->GetTabContentsAt(singleton_index);
- // Load the URL if the target contents URL doesn't match. This can happen
- // if the URL path is ignored when locating the singleton tab.
- if (target->GetURL() != params->url) {
+ if (params->path_behavior == NavigateParams::IGNORE_AND_NAVIGATE &&
+ target->GetURL() != params->url) {
target->controller().LoadURL(
params->url, params->referrer, params->transition);
}
diff --git a/chrome/browser/ui/browser_navigator.h b/chrome/browser/ui/browser_navigator.h
index 2b726d0..c3f066a 100644
--- a/chrome/browser/ui/browser_navigator.h
+++ b/chrome/browser/ui/browser_navigator.h
@@ -122,9 +122,17 @@ struct NavigateParams {
// automatically.
bool show_window;
- // True if the paths of the target content's URL and |url| should be ignored
- // when locating a singleton tab.
- bool ignore_path;
+ // What to do with the path component of the URL for singleton navigations.
+ enum PathBehavior {
+ // Two URLs with differing paths are different.
+ RESPECT,
+ // Ignore path when finding existing tab, navigate to new URL.
+ IGNORE_AND_NAVIGATE,
+ // Ignore path when finding existing tab, don't navigate tab.
+ IGNORE_AND_STAY_PUT,
+ };
+ // Default is RESPECT.
+ PathBehavior path_behavior;
// [in] Specifies a Browser object where the navigation could occur or the
// tab could be added. Navigate() is not obliged to use this Browser if
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index a9d153c..a65c1f4 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -555,7 +555,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, NullBrowser_NewWindow) {
}
// This test verifies that constructing params with disposition = SINGLETON_TAB
-// and |ignore_path| = true opens a new tab navigated to the specified URL if
+// and IGNORE_AND_NAVIGATE opens a new tab navigated to the specified URL if
// no previous tab with that URL (minus the path) exists.
IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
Disposition_SingletonTabNew_IgnorePath) {
@@ -572,7 +572,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
p.disposition = SINGLETON_TAB;
p.url = GURL("chrome://settings/advanced");
p.show_window = true;
- p.ignore_path = true;
+ p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE;
browser::Navigate(&p);
// The last tab should now be selected and navigated to the sub-page of the
@@ -585,7 +585,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
}
// This test verifies that constructing params with disposition = SINGLETON_TAB
-// and |ignore_path| = true opens an existing tab with the matching URL (minus
+// and IGNORE_AND_NAVIGATE opens an existing tab with the matching URL (minus
// the path) which is navigated to the specified URL.
IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
Disposition_SingletonTabExisting_IgnorePath) {
@@ -604,7 +604,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
p.disposition = SINGLETON_TAB;
p.url = GURL("chrome://settings/advanced");
p.show_window = true;
- p.ignore_path = true;
+ p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE;
browser::Navigate(&p);
// The middle tab should now be selected and navigated to the sub-page of the
@@ -617,7 +617,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
}
// This test verifies that constructing params with disposition = SINGLETON_TAB
-// and |ignore_path| = true opens an existing tab with the matching URL (minus
+// and IGNORE_AND_NAVIGATE opens an existing tab with the matching URL (minus
// the path) which is navigated to the specified URL.
IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
Disposition_SingletonTabExistingSubPath_IgnorePath) {
@@ -636,7 +636,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
p.disposition = SINGLETON_TAB;
p.url = GURL("chrome://settings/personal");
p.show_window = true;
- p.ignore_path = true;
+ p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE;
browser::Navigate(&p);
// The middle tab should now be selected and navigated to the sub-page of the
@@ -649,7 +649,38 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
}
// This test verifies that constructing params with disposition = SINGLETON_TAB
-// and |ignore_path| = true will update the current tab's URL if the currently
+// and IGNORE_AND_STAY_PUT opens an existing tab with the matching URL (minus
+// the path).
+IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
+ Disposition_SingletonTabExistingSubPath_IgnorePath2) {
+ GURL singleton_url1("chrome://settings/advanced");
+ GURL url("http://www.google.com/");
+ browser()->AddSelectedTabWithURL(singleton_url1, PageTransition::LINK);
+ browser()->AddSelectedTabWithURL(url, PageTransition::LINK);
+
+ // We should have one browser with 3 tabs, the 3rd selected.
+ EXPECT_EQ(1u, BrowserList::size());
+ EXPECT_EQ(3, browser()->tab_count());
+ EXPECT_EQ(2, browser()->selected_index());
+
+ // Navigate to singleton_url1.
+ browser::NavigateParams p(MakeNavigateParams());
+ p.disposition = SINGLETON_TAB;
+ p.url = GURL("chrome://settings/personal");
+ p.show_window = true;
+ p.path_behavior = browser::NavigateParams::IGNORE_AND_STAY_PUT;
+ browser::Navigate(&p);
+
+ // The middle tab should now be selected.
+ EXPECT_EQ(browser(), p.browser);
+ EXPECT_EQ(3, browser()->tab_count());
+ EXPECT_EQ(1, browser()->selected_index());
+ EXPECT_EQ(singleton_url1,
+ browser()->GetSelectedTabContents()->GetURL());
+}
+
+// This test verifies that constructing params with disposition = SINGLETON_TAB
+// and IGNORE_AND_NAVIGATE will update the current tab's URL if the currently
// selected tab is a match but has a different path.
IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
Disposition_SingletonTabFocused_IgnorePath) {
@@ -668,7 +699,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
p.disposition = SINGLETON_TAB;
p.url = singleton_url_target;
p.show_window = true;
- p.ignore_path = true;
+ p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE;
browser::Navigate(&p);
// The second tab should still be selected, but navigated to the new path.
@@ -680,8 +711,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
}
// This test verifies that constructing params with disposition = SINGLETON_TAB
-// and |ignore_path| = true will open an existing matching tab
-// with a different query.
+// and IGNORE_AND_NAVIGATE will open an existing matching tab with a different
+// query.
IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
Disposition_SingletonTabExisting_IgnoreQuery) {
int initial_tab_count = browser()->tab_count();
@@ -699,7 +730,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
p.disposition = SINGLETON_TAB;
p.url = singleton_url_target;
p.show_window = true;
- p.ignore_path = true;
+ p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE;
browser::Navigate(&p);
// Last tab should still be selected.
@@ -723,7 +754,6 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
p.disposition = SINGLETON_TAB;
p.url = GURL("chrome://settings");
p.show_window = true;
- p.ignore_path = true;
browser::Navigate(&p);
// The settings page should be opened in browser() window.
@@ -749,7 +779,6 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
p.disposition = SINGLETON_TAB;
p.url = GURL("chrome://bookmarks");
p.show_window = true;
- p.ignore_path = true;
browser::Navigate(&p);
// The bookmarks page should be opened in browser() window.
diff --git a/chrome/browser/ui/browser_navigator_browsertest_chromeos.cc b/chrome/browser/ui/browser_navigator_browsertest_chromeos.cc
index 960d244..28006c1 100644
--- a/chrome/browser/ui/browser_navigator_browsertest_chromeos.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest_chromeos.cc
@@ -39,7 +39,7 @@ IN_PROC_BROWSER_TEST_F(BrowserGuestSessionNavigatorTest,
p.disposition = SINGLETON_TAB;
p.url = GURL("chrome://settings");
p.show_window = true;
- p.ignore_path = true;
+ p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE;
browser::Navigate(&p);
// Settings page should be opened in incognito window.
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
index 67943d9..593478e 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -155,7 +155,7 @@ void BackForwardMenuModel::ActivatedAtWithDisposition(
if (index == GetItemCount() - 1) {
UserMetrics::RecordComputedAction(BuildActionName("ShowFullHistory", -1),
profile);
- browser_->ShowSingletonTab(GURL(chrome::kChromeUIHistoryURL), false);
+ browser_->ShowSingletonTab(GURL(chrome::kChromeUIHistoryURL));
return;
}
diff --git a/chrome/browser/ui/webui/bug_report_ui.cc b/chrome/browser/ui/webui/bug_report_ui.cc
index 537574c..ead88b1 100644
--- a/chrome/browser/ui/webui/bug_report_ui.cc
+++ b/chrome/browser/ui/webui/bug_report_ui.cc
@@ -157,7 +157,7 @@ void ShowHtmlBugReportView(Browser* browser) {
RefreshLastScreenshot(browser);
std::string bug_report_url = std::string(chrome::kChromeUIBugReportURL) +
"#" + base::IntToString(browser->selected_index());
- browser->ShowSingletonTab(GURL(bug_report_url), false);
+ browser->ShowSingletonTab(GURL(bug_report_url));
}
} // namespace browser
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h
index 8f2d3aa..85d4731 100644
--- a/chrome/common/url_constants.h
+++ b/chrome/common/url_constants.h
@@ -182,7 +182,6 @@ extern const char kBrowserOptionsSubPage[];
extern const char kClearBrowserDataSubPage[];
extern const char kContentSettingsSubPage[];
extern const char kContentSettingsExceptionsSubPage[];
-extern const char kDefaultOptionsSubPage[];
extern const char kImportDataSubPage[];
extern const char kPersonalOptionsSubPage[];
extern const char kSearchEnginesOptionsSubPage[];
diff --git a/content/browser/renderer_host/render_process_host_browsertest.cc b/content/browser/renderer_host/render_process_host_browsertest.cc
index afe829c..62c05b5 100644
--- a/content/browser/renderer_host/render_process_host_browsertest.cc
+++ b/content/browser/renderer_host/render_process_host_browsertest.cc
@@ -78,7 +78,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessPerTab) {
// Create a new TYPE_NORMAL tab. It should be in its own process.
GURL page1("data:text/html,hello world1");
- browser()->ShowSingletonTab(page1, false);
+ browser()->ShowSingletonTab(page1);
if (browser()->tab_count() == tab_count)
ui_test_utils::WaitForNewTab(browser());
tab_count++;
@@ -88,7 +88,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessPerTab) {
// Create another TYPE_NORMAL tab. It should share the previous process.
GURL page2("data:text/html,hello world2");
- browser()->ShowSingletonTab(page2, false);
+ browser()->ShowSingletonTab(page2);
if (browser()->tab_count() == tab_count)
ui_test_utils::WaitForNewTab(browser());
tab_count++;
@@ -122,7 +122,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, DevToolsOnSelfInOwnProcessPPT) {
int host_count = 1;
GURL page1("data:text/html,hello world1");
- browser()->ShowSingletonTab(page1, false);
+ browser()->ShowSingletonTab(page1);
if (browser()->tab_count() == tab_count)
ui_test_utils::WaitForNewTab(browser());
tab_count++;
@@ -154,7 +154,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, DevToolsOnSelfInOwnProcess) {
int host_count = 1;
GURL page1("data:text/html,hello world1");
- browser()->ShowSingletonTab(page1, false);
+ browser()->ShowSingletonTab(page1);
if (browser()->tab_count() == tab_count)
ui_test_utils::WaitForNewTab(browser());
tab_count++;
@@ -206,7 +206,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) {
// Create a new TYPE_NORMAL tab. It should be in its own process.
GURL page1("data:text/html,hello world1");
- browser()->ShowSingletonTab(page1, false);
+ browser()->ShowSingletonTab(page1);
if (browser()->tab_count() == tab_count)
ui_test_utils::WaitForNewTab(browser());
tab_count++;
@@ -220,7 +220,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) {
// Create another TYPE_NORMAL tab. It should share the previous process.
GURL page2("data:text/html,hello world2");
- browser()->ShowSingletonTab(page2, false);
+ browser()->ShowSingletonTab(page2);
if (browser()->tab_count() == tab_count)
ui_test_utils::WaitForNewTab(browser());
tab_count++;
@@ -235,7 +235,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) {
// bug 43448 where extension and WebUI tabs could get combined into normal
// renderers.
GURL history(chrome::kChromeUIHistoryURL);
- browser()->ShowSingletonTab(history, false);
+ browser()->ShowSingletonTab(history);
if (browser()->tab_count() == tab_count)
ui_test_utils::WaitForNewTab(browser());
tab_count++;
@@ -248,7 +248,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) {
// Create a TYPE_EXTENSION tab. It should be in its own process.
// (the bookmark manager is implemented as an extension)
GURL bookmarks(chrome::kChromeUIBookmarksURL);
- browser()->ShowSingletonTab(bookmarks, false);
+ browser()->ShowSingletonTab(bookmarks);
if (browser()->tab_count() == tab_count)
ui_test_utils::WaitForNewTab(browser());
tab_count++;