OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_TEST_SERVERS_HTTP_RESPONSE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_TEST_SERVERS_HTTP_RESPONSE_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <map> |
| 10 #include "base/basictypes.h" |
| 11 |
| 12 namespace gdata { |
| 13 namespace test_servers { |
| 14 |
| 15 enum RESPONSE_CODE { |
| 16 SUCCESS = 200, |
| 17 MOVED = 301, |
| 18 NOT_FOUND = 404, |
| 19 ACCESS_DENIED = 500 |
| 20 }; |
| 21 |
| 22 // Wraps the HTTP response. Since it can be big, it may be better to use |
| 23 // scoped_ptr to pass it instead of copying. |
| 24 class HttpResponse { |
| 25 public: |
| 26 HttpResponse(): code(SUCCESS) {} |
| 27 virtual ~HttpResponse() {} |
| 28 |
| 29 RESPONSE_CODE code; |
| 30 std::string content; |
| 31 std::string content_type; |
| 32 std::map<std::string, std::string> custom_headers; |
| 33 }; |
| 34 |
| 35 } // namespace test_servers |
| 36 } // namespace gdata |
| 37 |
| 38 #endif // CHROME_BROWSER_CHROMEOS_GDATA_TEST_SERVERS_HTTP_RESPONSE_H_ |
OLD | NEW |