Index: chrome/browser/chromeos/drive/test_servers/http_response.h |
diff --git a/chrome/browser/chromeos/drive/test_servers/http_response.h b/chrome/browser/chromeos/drive/test_servers/http_response.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e5401751ed2a4f0a121bc1d09e8adaa67a6dd566 |
--- /dev/null |
+++ b/chrome/browser/chromeos/drive/test_servers/http_response.h |
@@ -0,0 +1,41 @@ |
+// 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_CHROMEOS_DRIVE_TEST_SERVERS_HTTP_RESPONSE_H_ |
+#define CHROME_BROWSER_CHROMEOS_DRIVE_TEST_SERVERS_HTTP_RESPONSE_H_ |
+ |
+#include <string> |
+#include <map> |
+#include "base/basictypes.h" |
+ |
+namespace drive { |
+namespace test_servers { |
+ |
+enum ResponseCode { |
+ SUCCESS = 200, |
+ MOVED = 301, |
+ NOT_FOUND = 404, |
+ ACCESS_DENIED = 500, |
+}; |
+ |
+// Wraps the HTTP response. Since it can be big, it may be better to use |
satorux1
2012/11/12 06:07:00
Wraps -> Represents ?
mtomasz
2012/11/12 12:17:44
Done.
|
+// scoped_ptr to pass it instead of copying. |
+class HttpResponse { |
satorux1
2012/11/12 06:07:00
class -> struct
mtomasz
2012/11/12 12:17:44
Done.
|
+ public: |
+ HttpResponse(); |
+ virtual ~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. |
+ virtual std::string ToResponseString() const; |
satorux1
2012/11/12 06:07:00
why virtual?
mtomasz
2012/11/12 12:17:44
Done.
|
+}; |
+ |
+} // namespace test_servers |
+} // namespace drive |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_DRIVE_TEST_SERVERS_HTTP_RESPONSE_H_ |