summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tabs
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-27 23:01:50 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-27 23:01:50 +0000
commitc058805b99cce98cbc352c499f3e69fd355a84c2 (patch)
tree93fb4ffdf5daf4d8ae0e3291919a074a8b9e58a7 /chrome/browser/tabs
parentf07cc2ebf950cb22c5c386f95a1be0292de4db3b (diff)
downloadchromium_src-c058805b99cce98cbc352c499f3e69fd355a84c2.zip
chromium_src-c058805b99cce98cbc352c499f3e69fd355a84c2.tar.gz
chromium_src-c058805b99cce98cbc352c499f3e69fd355a84c2.tar.bz2
Plumb the referrer throughout the OpenURL APIs.
http://code.google.com/p/chromium/issues/detail?id=3224 Caveats: * Did not update TabNavigation yet. Hence session restore will continue to load the tabs with empty referrer. * Did not plumb referrer into incognito url open. (Not sure what the right thing to do is here with respect to privacy vs compatibility.) * Did not plumb referrer throughout the automation controller. No functional impact here, but it makes the code inconsistent with the non-automation version. Review URL: http://codereview.chromium.org/8186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc4
-rw-r--r--chrome/browser/tabs/tab_strip_model.h1
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc3
3 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 8e320bc..40d1911 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -334,7 +334,7 @@ bool TabStripModel::ShouldResetGroupOnSelect(TabContents* contents) const {
TabContents* TabStripModel::AddBlankTab(bool foreground) {
DCHECK(delegate_);
TabContents* contents = delegate_->CreateTabContentsForURL(
- NewTabUIURL(), profile_, PageTransition::TYPED, false, NULL);
+ NewTabUIURL(), GURL(), profile_, PageTransition::TYPED, false, NULL);
AddTabContents(contents, -1, PageTransition::TYPED, foreground);
return contents;
}
@@ -342,7 +342,7 @@ TabContents* TabStripModel::AddBlankTab(bool foreground) {
TabContents* TabStripModel::AddBlankTabAt(int index, bool foreground) {
DCHECK(delegate_);
TabContents* contents = delegate_->CreateTabContentsForURL(
- NewTabUIURL(), profile_, PageTransition::LINK, false, NULL);
+ NewTabUIURL(), GURL(), profile_, PageTransition::LINK, false, NULL);
AddTabContents(contents, index, PageTransition::LINK, foreground);
return contents;
}
diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h
index fd3a196..4329a6e 100644
--- a/chrome/browser/tabs/tab_strip_model.h
+++ b/chrome/browser/tabs/tab_strip_model.h
@@ -118,6 +118,7 @@ class TabStripModelDelegate {
// If |instance| is not null, its process is used to render the tab.
virtual TabContents* CreateTabContentsForURL(
const GURL& url,
+ const GURL& referrer,
Profile* profile,
PageTransition::Type transition,
bool defer_load,
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index cac7612..d051bf9 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -108,7 +108,7 @@ class TabStripModelTest : public testing::Test {
// Forwards a URL "load" request through to our dummy TabContents
// implementation.
void LoadURL(TabContents* contents, const std::wstring& url) {
- contents->controller()->LoadURL(GURL(url), PageTransition::LINK);
+ contents->controller()->LoadURL(GURL(url), GURL(), PageTransition::LINK);
}
void GoBack(TabContents* contents) {
@@ -997,6 +997,7 @@ class TabStripDummyDelegate : public TabStripModelDelegate {
virtual int GetDragActions() const { return 0; }
virtual TabContents* CreateTabContentsForURL(
const GURL& url,
+ const GURL& referrer,
Profile* profile,
PageTransition::Type transition,
bool defer_load,