OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/test/chromedriver/server/http_response.h" | 5 #include "chrome/test/chromedriver/server/http_response.h" |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 | 10 |
11 const int HttpResponse::kOk = 200; | 11 const int HttpResponse::kOk = 200; |
12 const int HttpResponse::kNoContent = 204; | 12 const int HttpResponse::kNoContent = 204; |
13 const int HttpResponse::kSeeOther = 303; | 13 const int HttpResponse::kSeeOther = 303; |
14 const int HttpResponse::kNotModified = 304; | 14 const int HttpResponse::kNotModified = 304; |
15 const int HttpResponse::kBadRequest = 400; | 15 const int HttpResponse::kBadRequest = 400; |
16 const int HttpResponse::kForbidden = 403; | 16 const int HttpResponse::kForbidden = 403; |
17 const int HttpResponse::kNotFound = 404; | 17 const int HttpResponse::kNotFound = 404; |
18 const int HttpResponse::kMethodNotAllowed = 405; | 18 const int HttpResponse::kMethodNotAllowed = 405; |
19 const int HttpResponse::kInternalServerError = 500; | 19 const int HttpResponse::kInternalServerError = 500; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 void HttpResponse::set_body(const std::string& body) { | 146 void HttpResponse::set_body(const std::string& body) { |
147 body_ = body; | 147 body_ = body; |
148 } | 148 } |
149 | 149 |
150 void HttpResponse::UpdateHeader(const std::string& name, | 150 void HttpResponse::UpdateHeader(const std::string& name, |
151 const std::string& new_value) { | 151 const std::string& new_value) { |
152 RemoveHeader(name); | 152 RemoveHeader(name); |
153 AddHeader(name, new_value); | 153 AddHeader(name, new_value); |
154 } | 154 } |
OLD | NEW |