summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
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/download
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/download')
-rw-r--r--chrome/browser/download/download_request_manager_unittest.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/download/download_request_manager_unittest.cc b/chrome/browser/download/download_request_manager_unittest.cc
index 9293426..14ba6be 100644
--- a/chrome/browser/download/download_request_manager_unittest.cc
+++ b/chrome/browser/download/download_request_manager_unittest.cc
@@ -109,7 +109,7 @@ TEST_F(DownloadRequestManagerTest, Allow) {
}
TEST_F(DownloadRequestManagerTest, ResetOnNavigation) {
- controller_->LoadURL(GURL(factory_->scheme() + "://foo.com/bar"), 0);
+ controller_->LoadURL(GURL(factory_->scheme() + "://foo.com/bar"), GURL(), 0);
// Do two downloads, allowing the second so that we end up with allow all.
CanDownload();
@@ -122,7 +122,8 @@ TEST_F(DownloadRequestManagerTest, ResetOnNavigation) {
// Navigate to a new URL with the same host, which shouldn't reset the allow
// all state.
- controller_->LoadURL(GURL(factory_->scheme() + "://foo.com/bar2"), 0);
+ controller_->LoadURL(GURL(factory_->scheme() + "://foo.com/bar2"),
+ GURL(), 0);
CanDownload();
ASSERT_EQ(1, continue_count_);
ASSERT_EQ(0, cancel_count_);
@@ -140,14 +141,14 @@ TEST_F(DownloadRequestManagerTest, ResetOnNavigation) {
controller_->active_contents()));
// Navigate to a completely different host, which should reset the state.
- controller_->LoadURL(GURL(factory_->scheme() + "://fooey.com"), 0);
+ controller_->LoadURL(GURL(factory_->scheme() + "://fooey.com"), GURL(), 0);
ASSERT_EQ(DownloadRequestManager::ALLOW_ONE_DOWNLOAD,
download_request_manager_->GetDownloadStatus(
controller_->active_contents()));
}
TEST_F(DownloadRequestManagerTest, ResetOnUserGesture) {
- controller_->LoadURL(GURL(factory_->scheme() + "://foo.com/bar"), 0);
+ controller_->LoadURL(GURL(factory_->scheme() + "://foo.com/bar"), GURL(), 0);
// Do one download, which should change to prompt before download.
CanDownload();