summaryrefslogtreecommitdiffstats
path: root/chrome/common/net/url_fetcher.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/net/url_fetcher.cc')
-rw-r--r--chrome/common/net/url_fetcher.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/common/net/url_fetcher.cc b/chrome/common/net/url_fetcher.cc
index 53487b7..e2aad81 100644
--- a/chrome/common/net/url_fetcher.cc
+++ b/chrome/common/net/url_fetcher.cc
@@ -127,6 +127,7 @@ class URLFetcher::Core
std::string upload_content_; // HTTP POST payload
std::string upload_content_type_; // MIME type of POST payload
+ std::string referrer_; // HTTP Referer header value
// Used to determine how long to wait before making a request or doing a
// retry.
@@ -336,6 +337,7 @@ void URLFetcher::Core::StartURLRequest() {
}
request_->set_load_flags(flags);
request_->set_context(request_context_getter_->GetURLRequestContext());
+ request_->set_referrer(referrer_);
switch (request_type_) {
case GET:
@@ -481,6 +483,10 @@ const std::string& URLFetcher::upload_data() const {
return core_->upload_content_;
}
+void URLFetcher::set_referrer(const std::string& referrer) {
+ core_->referrer_ = referrer;
+}
+
void URLFetcher::set_load_flags(int load_flags) {
core_->load_flags_ = load_flags;
}