Disable 'duplicate tab' functionality on interstitial pages
Currently, duplicating a tab that is showing an interstitial page will
duplicate the last committed navigation entry, which will likely not be
what the user expects. This CL simply disables the Duplicate Tab
functionality on interstitial pages. This matches the behavior when
there is no previously committed navigation entry before an
interstitial. (For example, navigate to https://badssl.com,
right-click on "expired", and open link in new tab. Note that Duplicate
Tab is disabled.)
BUG=310812
TEST=Visit https://badssl.com. Click "expired" and observe an SSL
page. Right-click on the tab at the top and observe that "Duplicate Tab"
is disabled.
Review URL: https://codereview.chromium.org/1152963007
Cr-Commit-Position: refs/heads/master@{#332614}
diff --git a/chrome/browser/ui/browser_commands.h b/chrome/browser/ui/browser_commands.h
index 90c98608..d14b516 100644
--- a/chrome/browser/ui/browser_commands.h
+++ b/chrome/browser/ui/browser_commands.h
@@ -91,7 +91,7 @@
void DuplicateTab(Browser* browser);
bool CanDuplicateTab(const Browser* browser);
content::WebContents* DuplicateTabAt(Browser* browser, int index);
-bool CanDuplicateTabAt(Browser* browser, int index);
+bool CanDuplicateTabAt(const Browser* browser, int index);
void ConvertPopupToTabbedBrowser(Browser* browser);
void Exit();
void BookmarkCurrentPageIgnoringExtensionOverrides(Browser* browser);