Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(851)

Unified Diff: chrome/browser/chromeos/gdata/test_servers/http_response.h

Issue 11088073: HTTP server for testing Google Drive. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed comments. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/gdata/test_servers/http_response.h
diff --git a/chrome/browser/chromeos/gdata/test_servers/http_response.h b/chrome/browser/chromeos/gdata/test_servers/http_response.h
new file mode 100644
index 0000000000000000000000000000000000000000..1b3839b9b9abdd0b1e4f3fce65cf0407e50ad489
--- /dev/null
+++ b/chrome/browser/chromeos/gdata/test_servers/http_response.h
@@ -0,0 +1,38 @@
+// 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_GDATA_TEST_SERVERS_HTTP_RESPONSE_H_
+#define CHROME_BROWSER_CHROMEOS_GDATA_TEST_SERVERS_HTTP_RESPONSE_H_
+
+#include <string>
+#include <map>
+#include "base/basictypes.h"
+
+namespace gdata {
+namespace test_servers {
+
+enum RESPONSE_CODE {
+ 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
+// scoped_ptr to pass it instead of copying.
+class HttpResponse {
+ public:
+ HttpResponse(): code(SUCCESS) {}
+ virtual ~HttpResponse() {}
+
+ RESPONSE_CODE code;
+ std::string content;
+ std::string content_type;
+ std::map<std::string, std::string> custom_headers;
+};
+
+} // namespace test_servers
+} // namespace gdata
+
+#endif // CHROME_BROWSER_CHROMEOS_GDATA_TEST_SERVERS_HTTP_RESPONSE_H_

Powered by Google App Engine
This is Rietveld 408576698