| Index: chrome_frame/test/test_server.h
|
| ===================================================================
|
| --- chrome_frame/test/test_server.h (revision 51968)
|
| +++ chrome_frame/test/test_server.h (working copy)
|
| @@ -370,17 +370,30 @@
|
| // instance to send the response.
|
| class HTTPTestServer : public ListenSocket::ListenSocketDelegate {
|
| public:
|
| - explicit HTTPTestServer(int port, const char* address);
|
| + explicit HTTPTestServer(int port, const std::wstring& address,
|
| + FilePath root_dir);
|
| virtual ~HTTPTestServer();
|
| +
|
| // HTTP GET request is received. Override in derived classes.
|
| // |connection| can be used to send the response.
|
| virtual void Get(ConfigurableConnection* connection,
|
| - const std::string& path, const Request& r) = 0;
|
| + const std::wstring& path, const Request& r) = 0;
|
| +
|
| // HTTP POST request is received. Override in derived classes.
|
| // |connection| can be used to send the response
|
| virtual void Post(ConfigurableConnection* connection,
|
| - const std::string& path, const Request& r) = 0;
|
| + const std::wstring& path, const Request& r) = 0;
|
|
|
| + // Return the appropriate url with the specified path for this server.
|
| + std::wstring Resolve(const std::wstring& path);
|
| +
|
| + FilePath root_dir() { return root_dir_; }
|
| +
|
| + protected:
|
| + int port_;
|
| + std::wstring address_;
|
| + FilePath root_dir_;
|
| +
|
| private:
|
| typedef std::list<scoped_refptr<ConfigurableConnection> > ConnectionList;
|
| ConnectionList::iterator FindConnection(const ListenSocket* socket);
|
| @@ -394,10 +407,10 @@
|
|
|
| scoped_refptr<ListenSocket> server_;
|
| ConnectionList connection_list_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(HTTPTestServer);
|
| };
|
|
|
| -
|
| } // namespace test_server
|
|
|
| #endif // CHROME_FRAME_TEST_TEST_SERVER_H_
|
|
|