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

Unified Diff: net/http/http_request_headers.h

Issue 6065008: Do not override User-Agent header added by WebCore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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 | « no previous file | net/http/http_request_headers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_request_headers.h
diff --git a/net/http/http_request_headers.h b/net/http/http_request_headers.h
index 734194a25a991bfe4aa31d1d51756950a00a887a..2962ae2fdec4beb49e92255e931804dee98b5f0b 100644
--- a/net/http/http_request_headers.h
+++ b/net/http/http_request_headers.h
@@ -95,6 +95,12 @@ class HttpRequestHeaders {
// in the vector remains the same. When comparing |key|, case is ignored.
void SetHeader(const base::StringPiece& key, const base::StringPiece& value);
+ // Sets the header value pair for |key| and |value|, if |key| does not exist.
+ // If |key| already exists, the call is a no-op.
+ // When comparing |key|, case is ignored.
+ void SetHeaderIfMissing(const base::StringPiece& key,
+ const base::StringPiece& value);
+
// Removes the first header that matches (case insensitive) |key|.
void RemoveHeader(const base::StringPiece& key);
« no previous file with comments | « no previous file | net/http/http_request_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698