| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_GOOGLE_APIS_TEST_SERVER_HTTP_RESPONSE_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_TEST_SERVER_HTTP_RESPONSE_H_ |
| 6 #define CHROME_BROWSER_GOOGLE_APIS_TEST_SERVER_HTTP_RESPONSE_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_TEST_SERVER_HTTP_RESPONSE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 | 12 |
| 13 namespace google_apis { | 13 namespace google_apis { |
| 14 namespace test_server { | 14 namespace test_server { |
| 15 | 15 |
| 16 enum ResponseCode { | 16 enum ResponseCode { |
| 17 SUCCESS = 200, | 17 SUCCESS = 200, |
| 18 MOVED = 301, | 18 MOVED = 301, |
| 19 RESUME_INCOMPLETE = 308, |
| 19 NOT_FOUND = 404, | 20 NOT_FOUND = 404, |
| 20 ACCESS_DENIED = 500, | 21 ACCESS_DENIED = 500, |
| 21 }; | 22 }; |
| 22 | 23 |
| 23 // Respresents a HTTP response. Since it can be big, it may be better to use | 24 // Respresents a HTTP response. Since it can be big, it may be better to use |
| 24 // scoped_ptr to pass it instead of copying. | 25 // scoped_ptr to pass it instead of copying. |
| 25 class HttpResponse { | 26 class HttpResponse { |
| 26 public: | 27 public: |
| 27 HttpResponse(); | 28 HttpResponse(); |
| 28 ~HttpResponse(); | 29 ~HttpResponse(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 58 ResponseCode code_; | 59 ResponseCode code_; |
| 59 std::string content_; | 60 std::string content_; |
| 60 std::string content_type_; | 61 std::string content_type_; |
| 61 std::map<std::string, std::string> custom_headers_; | 62 std::map<std::string, std::string> custom_headers_; |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 } // namespace test_servers | 65 } // namespace test_servers |
| 65 } // namespace google_apis | 66 } // namespace google_apis |
| 66 | 67 |
| 67 #endif // CHROME_BROWSER_GOOGLE_APIS_TEST_SERVER_HTTP_RESPONSE_H_ | 68 #endif // CHROME_BROWSER_GOOGLE_APIS_TEST_SERVER_HTTP_RESPONSE_H_ |
| OLD | NEW |