Index: chrome/browser/google_apis/test_server/http_response.h |
diff --git a/chrome/browser/google_apis/test_server/http_response.h b/chrome/browser/google_apis/test_server/http_response.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3602f23bcbe8a35ba387ddd31e815d5155cc1c31 |
--- /dev/null |
+++ b/chrome/browser/google_apis/test_server/http_response.h |
@@ -0,0 +1,40 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_GOOGLE_APIS_TEST_SERVER_HTTP_RESPONSE_H_ |
+#define CHROME_BROWSER_GOOGLE_APIS_TEST_SERVER_HTTP_RESPONSE_H_ |
+ |
+#include <string> |
+#include <map> |
+#include "base/basictypes.h" |
+ |
+namespace drive { |
+namespace test_server { |
+ |
+enum ResponseCode { |
+ SUCCESS = 200, |
+ MOVED = 301, |
+ NOT_FOUND = 404, |
+ ACCESS_DENIED = 500, |
+}; |
+ |
+// Respresents a HTTP response. Since it can be big, it may be better to use |
+// scoped_ptr to pass it instead of copying. |
+struct HttpResponse { |
+ HttpResponse(); |
+ ~HttpResponse(); |
+ |
+ ResponseCode code; |
+ std::string content; |
+ std::string content_type; |
+ std::map<std::string, std::string> custom_headers; |
+ |
+ // Generates and returns a http response string. |
+ std::string ToResponseString() const; |
+}; |
+ |
+} // namespace test_servers |
+} // namespace drive |
+ |
+#endif // CHROME_BROWSER_GOOGLE_APIS_TEST_SERVER_HTTP_RESPONSE_H_ |