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

Unified Diff: chrome/common/net/url_fetcher.cc

Issue 6308009: If user had consented for metrics reporting, send speech input request origin to the server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 11 months 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
« no previous file with comments | « chrome/common/net/url_fetcher.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/url_fetcher.cc
diff --git a/chrome/common/net/url_fetcher.cc b/chrome/common/net/url_fetcher.cc
index 53487b712215e56ff585fef3947a97382261e39f..e2aad810d92d020242a6173c2beccee51810151f 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;
}
« no previous file with comments | « chrome/common/net/url_fetcher.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698