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

Unified Diff: net/http/http_request_headers.cc

Issue 6339012: More net/ method ordering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More done while waiting for previous patch to clear 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 | « net/http/http_network_layer.cc ('k') | net/http/mock_gssapi_library_posix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_request_headers.cc
diff --git a/net/http/http_request_headers.cc b/net/http/http_request_headers.cc
index 9ce77bfd3b14cfbde082851f577d6abf41ebbc07..9d523c1bcdf5c1bdd56c1ca972ecf99dc03ccc8f 100644
--- a/net/http/http_request_headers.cc
+++ b/net/http/http_request_headers.cc
@@ -77,13 +77,6 @@ void HttpRequestHeaders::Clear() {
headers_.clear();
}
-void HttpRequestHeaders::SetHeaderIfMissing(const base::StringPiece& key,
- const base::StringPiece& value) {
- HeaderVector::iterator it = FindHeader(key);
- if (it == headers_.end())
- headers_.push_back(HeaderKeyValuePair(key.as_string(), value.as_string()));
-}
-
void HttpRequestHeaders::SetHeader(const base::StringPiece& key,
const base::StringPiece& value) {
HeaderVector::iterator it = FindHeader(key);
@@ -93,6 +86,13 @@ void HttpRequestHeaders::SetHeader(const base::StringPiece& key,
headers_.push_back(HeaderKeyValuePair(key.as_string(), value.as_string()));
}
+void HttpRequestHeaders::SetHeaderIfMissing(const base::StringPiece& key,
+ const base::StringPiece& value) {
+ HeaderVector::iterator it = FindHeader(key);
+ if (it == headers_.end())
+ headers_.push_back(HeaderKeyValuePair(key.as_string(), value.as_string()));
+}
+
void HttpRequestHeaders::RemoveHeader(const base::StringPiece& key) {
HeaderVector::iterator it = FindHeader(key);
if (it != headers_.end())
« no previous file with comments | « net/http/http_network_layer.cc ('k') | net/http/mock_gssapi_library_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698