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

Unified Diff: content/test/net/url_request_mock_http_job.cc

Issue 10855209: Refactoring: ProtocolHandler::MaybeCreateJob takes NetworkDelegate as argument (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest merge Created 8 years, 4 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
« no previous file with comments | « content/test/net/url_request_mock_http_job.h ('k') | content/test/net/url_request_slow_download_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/net/url_request_mock_http_job.cc
diff --git a/content/test/net/url_request_mock_http_job.cc b/content/test/net/url_request_mock_http_job.cc
index 69f57622d27f1bf7cc2f6a6c5eb67746fa2f71b4..5a4d28ded20b9b282560facd15dd8ce832158bb6 100644
--- a/content/test/net/url_request_mock_http_job.cc
+++ b/content/test/net/url_request_mock_http_job.cc
@@ -12,7 +12,6 @@
#include "content/public/common/url_constants.h"
#include "net/base/net_util.h"
#include "net/http/http_response_headers.h"
-#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_filter.h"
const char kMockHostname[] = "mock.http";
@@ -31,9 +30,12 @@ FilePath& BasePath() {
} // namespace
// static
-net::URLRequestJob* URLRequestMockHTTPJob::Factory(net::URLRequest* request,
- const std::string& scheme) {
+net::URLRequestJob* URLRequestMockHTTPJob::Factory(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
+ const std::string& scheme) {
return new URLRequestMockHTTPJob(request,
+ network_delegate,
GetOnDiskPath(BasePath(), request, scheme));
}
@@ -81,11 +83,11 @@ FilePath URLRequestMockHTTPJob::GetOnDiskPath(const FilePath& base_path,
return file_path;
}
-URLRequestMockHTTPJob::URLRequestMockHTTPJob(net::URLRequest* request,
- const FilePath& file_path)
- : net::URLRequestFileJob(request,
- file_path,
- request->context()->network_delegate()) { }
+URLRequestMockHTTPJob::URLRequestMockHTTPJob(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
+ const FilePath& file_path)
+ : net::URLRequestFileJob(request, network_delegate, file_path) { }
// Public virtual version.
void URLRequestMockHTTPJob::GetResponseInfo(net::HttpResponseInfo* info) {
« no previous file with comments | « content/test/net/url_request_mock_http_job.h ('k') | content/test/net/url_request_slow_download_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698