diff options
author | Kristian Monsen <kristianm@google.com> | 2011-11-09 11:33:26 +0000 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-11-09 11:33:26 +0000 |
commit | 6aec04f56872b7b764c365c1ad4e3bba2d708977 (patch) | |
tree | 8f1efac93e5d369ede996eea4833cc778380b631 | |
parent | ae2796cabb52f6a27c50818b78107d3ebc858e0c (diff) | |
download | external_chromium-6aec04f56872b7b764c365c1ad4e3bba2d708977.zip external_chromium-6aec04f56872b7b764c365c1ad4e3bba2d708977.tar.gz external_chromium-6aec04f56872b7b764c365c1ad4e3bba2d708977.tar.bz2 |
Part of fix for bug 5584571 Add HTTP request header with app name
Cherry-picking net/url_request/url_request.cc part of:
http://codereview.chromium.org/7647028
Needed to add more headers to request by name.
Change-Id: I102d7aa4f8cf4c9e77a55fb4f3bf2294390089c5
-rw-r--r-- | net/url_request/url_request.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc index 007c7af..8fe7b43 100644 --- a/net/url_request/url_request.cc +++ b/net/url_request/url_request.cc @@ -221,7 +221,11 @@ void URLRequest::SetExtraRequestHeaderByName(const string& name, const string& value, bool overwrite) { DCHECK(!is_pending_); - NOTREACHED() << "implement me!"; + if (overwrite) { + extra_request_headers_.SetHeader(name, value); + } else { + extra_request_headers_.SetHeaderIfMissing(name, value); + } } void URLRequest::SetExtraRequestHeaders( |