Index: net/test/url_request/url_request_mock_http_job.h |
diff --git a/content/test/net/url_request_mock_http_job.h b/net/test/url_request/url_request_mock_http_job.h |
similarity index 66% |
rename from content/test/net/url_request_mock_http_job.h |
rename to net/test/url_request/url_request_mock_http_job.h |
index b6d13d87e94126572dbf6f3c811bb6b6e2528868..c1d4dd1199badcc42cd092a9b3ec4d8248bf74ab 100644 |
--- a/content/test/net/url_request_mock_http_job.h |
+++ b/net/test/url_request/url_request_mock_http_job.h |
@@ -2,10 +2,10 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
// |
-// A net::URLRequestJob class that pulls the content and http headers from disk. |
+// A net::URLRequestJob class that pulls the net and http headers from disk. |
-#ifndef CONTENT_TEST_NET_URL_REQUEST_MOCK_HTTP_JOB_H_ |
-#define CONTENT_TEST_NET_URL_REQUEST_MOCK_HTTP_JOB_H_ |
+#ifndef NET_TEST_URL_REQUEST_URL_REQUEST_MOCK_HTTP_JOB_H_ |
+#define NET_TEST_URL_REQUEST_URL_REQUEST_MOCK_HTTP_JOB_H_ |
#include <string> |
@@ -19,13 +19,15 @@ namespace net { |
class URLRequestInterceptor; |
} |
-namespace content { |
+namespace net { |
class URLRequestMockHTTPJob : public net::URLRequestFileJob { |
mmenke
2014/09/04 18:05:12
"net::" no longer needed in this file.
xunjieli
2014/09/04 18:44:25
Done.
|
public: |
- URLRequestMockHTTPJob(net::URLRequest* request, |
- net::NetworkDelegate* network_delegate, |
- const base::FilePath& file_path); |
+ URLRequestMockHTTPJob( |
+ net::URLRequest* request, |
+ net::NetworkDelegate* network_delegate, |
+ const base::FilePath& file_path, |
+ base::SequencedWorkerPool* worker_pool); |
virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
virtual int GetResponseCode() const OVERRIDE; |
@@ -35,12 +37,16 @@ class URLRequestMockHTTPJob : public net::URLRequestFileJob { |
int* http_status_code) OVERRIDE; |
// Adds the testing URLs to the net::URLRequestFilter. |
- static void AddUrlHandler(const base::FilePath& base_path); |
+ static void AddUrlHandler( |
+ const base::FilePath& base_path, |
+ base::SequencedWorkerPool* worker_pool); |
mmenke
2014/09/04 18:05:12
These should probably actually be:
const scoped_r
xunjieli
2014/09/04 18:44:25
Done.
|
// Respond to all HTTP requests of |hostname| with contents of the file |
// located at |file_path|. |
- static void AddHostnameToFileHandler(const std::string& hostname, |
- const base::FilePath& file); |
+ static void AddHostnameToFileHandler( |
+ const std::string& hostname, |
+ const base::FilePath& file, |
+ base::SequencedWorkerPool* worker_pool); |
// Given the path to a file relative to the path passed to AddUrlHandler(), |
// construct a mock URL. |
@@ -55,13 +61,16 @@ class URLRequestMockHTTPJob : public net::URLRequestFileJob { |
// file path leading to the root of the directory to use as the root of the |
// HTTP server. |
static scoped_ptr<net::URLRequestInterceptor> |
- CreateInterceptor(const base::FilePath& base_path); |
+ CreateInterceptor( |
+ const base::FilePath& base_path, |
+ base::SequencedWorkerPool* worker_pool); |
// Returns a net::URLRequestJobFactory::ProtocolHandler that serves |
// URLRequestMockHTTPJob's responding like an HTTP server. It responds to all |
// requests with the contents of |file|. |
static scoped_ptr<net::URLRequestInterceptor> |
- CreateInterceptorForSingleFile(const base::FilePath& file); |
+ CreateInterceptorForSingleFile(const base::FilePath& file, |
+ base::SequencedWorkerPool* worker_pool); |
protected: |
virtual ~URLRequestMockHTTPJob(); |
@@ -70,6 +79,6 @@ class URLRequestMockHTTPJob : public net::URLRequestFileJob { |
void GetResponseInfoConst(net::HttpResponseInfo* info) const; |
mmenke
2014/09/04 18:05:12
Another bug from before: There should be a "DISAL
xunjieli
2014/09/04 18:44:25
Done. Thanks!
|
}; |
-} // namespace content |
+} // namespace net |
-#endif // CONTENT_TEST_NET_URL_REQUEST_MOCK_HTTP_JOB_H_ |
+#endif // NET_TEST_URL_REQUEST_URL_REQUEST_MOCK_HTTP_JOB_H_ |