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

Unified Diff: net/test/embedded_test_server/http_response.h

Issue 15505003: GTTF: Convert most tests in content to use EmbeddedTestServer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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: net/test/embedded_test_server/http_response.h
diff --git a/net/test/embedded_test_server/http_response.h b/net/test/embedded_test_server/http_response.h
index b597ccebc13639d4b16a3bd0578732212550f4c2..cb83ad5e840a394814e31d3169e884805710fd61 100644
--- a/net/test/embedded_test_server/http_response.h
+++ b/net/test/embedded_test_server/http_response.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
namespace net {
namespace test_server {
@@ -24,12 +25,18 @@ enum ResponseCode {
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.
+// Respresents a HTTP response.
Avi (use Gerrit) 2013/05/21 00:24:22 fix typo
Paweł Hajdan Jr. 2013/05/21 17:56:03 Done.
class HttpResponse {
public:
- HttpResponse();
- ~HttpResponse();
+ virtual ~HttpResponse();
+
+ virtual std::string ToResponseString() const = 0;
satorux1 2013/05/21 07:40:18 function comment is missing. maybe: // Returns a
Paweł Hajdan Jr. 2013/05/21 17:56:03 Updated. Note that one of the implementations deli
+};
+
+class HttpResponseImpl : public HttpResponse {
satorux1 2013/05/21 07:40:18 I found this name unusual. Usually classes named "
Paweł Hajdan Jr. 2013/05/21 17:56:03 Done.
+ public:
+ HttpResponseImpl();
+ ~HttpResponseImpl();
// The response code.
ResponseCode code() const { return code_; }
@@ -56,13 +63,15 @@ class HttpResponse {
}
// Generates and returns a http response string.
- std::string ToResponseString() const;
+ virtual std::string ToResponseString() const OVERRIDE;
private:
ResponseCode code_;
std::string content_;
std::string content_type_;
std::map<std::string, std::string> custom_headers_;
+
+ DISALLOW_COPY_AND_ASSIGN(HttpResponseImpl);
};
} // namespace test_server
« no previous file with comments | « net/test/embedded_test_server/embedded_test_server_unittest.cc ('k') | net/test/embedded_test_server/http_response.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698