Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: chrome/browser/ui/browser.cc

Issue 8774041: Upgrade all call sites of PageNavigator::OpenURL that pass a referrer to use OpenURLParams (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 96993177ba5d5fd1bee5944e67ad628572aab442..7080216351df3988686b8f3d14987b94ad329422 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -769,8 +769,8 @@ TabContents* Browser::OpenApplicationTab(Profile* profile,
TabStripModel* model = browser->tabstrip_model();
int tab_index = model->GetWrapperIndex(existing_tab);
- existing_tab->OpenURL(extension_url, existing_tab->GetURL(),
- disposition, content::PAGE_TRANSITION_LINK);
+ existing_tab->OpenURL(OpenURLParams(extension_url, existing_tab->GetURL(),
+ disposition, content::PAGE_TRANSITION_LINK, false));
if (params.tabstrip_add_types & TabStripModel::ADD_PINNED) {
model->SetTabPinned(tab_index, true);
tab_index = model->GetWrapperIndex(existing_tab);
@@ -2967,6 +2967,8 @@ TabContents* Browser::OpenURL(const GURL& url,
const GURL& referrer,
WindowOpenDisposition disposition,
content::PageTransition transition) {
+ // For specifying a referrer, use the version of OpenURL taking OpenURLParams.
+ DCHECK(referrer.is_empty());
return OpenURLFromTab(NULL,
OpenURLParams(url, referrer, disposition, transition,
false));
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | chrome/browser/ui/cocoa/applescript/tab_applescript.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698