Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 96993177ba5d5fd1bee5944e67ad628572aab442..2ca3f7ce71b1888373c03fbf75b4e94c2fe394bd 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -769,8 +769,11 @@ 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, |
+ content::Referrer(existing_tab->GetURL(), |
+ WebKit::WebReferrerPolicyDefault), |
+ 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,9 +2970,10 @@ TabContents* Browser::OpenURL(const GURL& url, |
const GURL& referrer, |
WindowOpenDisposition disposition, |
content::PageTransition transition) { |
- return OpenURLFromTab(NULL, |
- OpenURLParams(url, referrer, disposition, transition, |
- false)); |
+ // For specifying a referrer, use the version of OpenURL taking OpenURLParams. |
+ DCHECK(referrer.is_empty()); |
+ return OpenURLFromTab(NULL, OpenURLParams( |
+ url, content::Referrer(), disposition, transition, false)); |
} |
TabContents* Browser::OpenURL(const OpenURLParams& params) { |
@@ -3046,7 +3050,7 @@ int Browser::GetDragActions() const { |
} |
TabContentsWrapper* Browser::CreateTabContentsForURL( |
- const GURL& url, const GURL& referrer, Profile* profile, |
+ const GURL& url, const content::Referrer& referrer, Profile* profile, |
content::PageTransition transition, bool defer_load, |
SiteInstance* instance) const { |
TabContentsWrapper* contents = TabContentsFactory(profile, instance, |
@@ -3374,16 +3378,6 @@ void Browser::TabStripEmpty() { |
/////////////////////////////////////////////////////////////////////////////// |
// Browser, TabContentsDelegate implementation: |
-// TODO(adriansc): Remove this method once refactoring changed all call sites. |
-TabContents* Browser::OpenURLFromTab(TabContents* source, |
- const GURL& url, |
- const GURL& referrer, |
- WindowOpenDisposition disposition, |
- content::PageTransition transition) { |
- return OpenURLFromTab(source, OpenURLParams(url, referrer, disposition, |
- transition, false)); |
-} |
- |
TabContents* Browser::OpenURLFromTab(TabContents* source, |
const OpenURLParams& params) { |
browser::NavigateParams nav_params(this, params.url, params.transition); |