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 CREATED = 201, |
18 MOVED = 301, | 19 MOVED = 301, |
| 20 RESUME_INCOMPLETE = 308, |
19 NOT_FOUND = 404, | 21 NOT_FOUND = 404, |
20 ACCESS_DENIED = 500, | 22 ACCESS_DENIED = 500, |
21 }; | 23 }; |
22 | 24 |
23 // Respresents a HTTP response. Since it can be big, it may be better to use | 25 // Respresents a HTTP response. Since it can be big, it may be better to use |
24 // scoped_ptr to pass it instead of copying. | 26 // scoped_ptr to pass it instead of copying. |
25 class HttpResponse { | 27 class HttpResponse { |
26 public: | 28 public: |
27 HttpResponse(); | 29 HttpResponse(); |
28 ~HttpResponse(); | 30 ~HttpResponse(); |
(...skipping 29 matching lines...) Expand all Loading... |
58 ResponseCode code_; | 60 ResponseCode code_; |
59 std::string content_; | 61 std::string content_; |
60 std::string content_type_; | 62 std::string content_type_; |
61 std::map<std::string, std::string> custom_headers_; | 63 std::map<std::string, std::string> custom_headers_; |
62 }; | 64 }; |
63 | 65 |
64 } // namespace test_servers | 66 } // namespace test_servers |
65 } // namespace google_apis | 67 } // namespace google_apis |
66 | 68 |
67 #endif // CHROME_BROWSER_GOOGLE_APIS_TEST_SERVER_HTTP_RESPONSE_H_ | 69 #endif // CHROME_BROWSER_GOOGLE_APIS_TEST_SERVER_HTTP_RESPONSE_H_ |
OLD | NEW |