Chromium Code Reviews| 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 |