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

Unified Diff: content/browser/renderer_host/resource_dispatcher_host_unittest.cc

Issue 10855209: Refactoring: ProtocolHandler::MaybeCreateJob takes NetworkDelegate as argument (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: content/browser/renderer_host/resource_dispatcher_host_unittest.cc
diff --git a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
index d22181dd92126a084911920a3ca4accedc85cf9d..62beebf8198872f450705bd8cd23eafca4cd50dc 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
@@ -221,8 +221,11 @@ class URLRequestTestDelayedStartJob : public net::URLRequestTestJob {
const std::string& response_headers,
const std::string& response_data,
bool auto_advance)
- : net::URLRequestTestJob(
- request, response_headers, response_data, auto_advance) {
+ : net::URLRequestTestJob(request,
+ request->context()->network_delegate(),
+ response_headers,
+ response_data,
+ auto_advance) {
Init();
}
@@ -295,8 +298,11 @@ class URLRequestTestDelayedCompletionJob : public net::URLRequestTestJob {
const std::string& response_headers,
const std::string& response_data,
bool auto_advance)
- : net::URLRequestTestJob(request, response_headers,
- response_data, auto_advance) {}
+ : net::URLRequestTestJob(request,
+ request->context()->network_delegate(),
+ response_headers,
+ response_data,
+ auto_advance) {}
protected:
~URLRequestTestDelayedCompletionJob() {}
@@ -307,8 +313,9 @@ class URLRequestTestDelayedCompletionJob : public net::URLRequestTestJob {
class URLRequestBigJob : public net::URLRequestSimpleJob {
public:
- URLRequestBigJob(net::URLRequest* request)
- : net::URLRequestSimpleJob(request) {
+ URLRequestBigJob(net::URLRequest* request,
+ net::NetworkDelegate* network_delegate)
+ : net::URLRequestSimpleJob(request, network_delegate) {
}
virtual int GetData(std::string* mime_type,
@@ -571,7 +578,8 @@ class ResourceDispatcherHostTest : public testing::Test,
} else if (delay_complete_) {
return new URLRequestTestDelayedCompletionJob(request);
} else if (scheme == "big-job") {
- return new URLRequestBigJob(request);
+ return new URLRequestBigJob(request,
+ request->context()->network_delegate());
} else {
return new net::URLRequestTestJob(request);
}
@@ -585,10 +593,12 @@ class ResourceDispatcherHostTest : public testing::Test,
request, test_fixture_->response_headers_,
test_fixture_->response_data_, false);
} else {
- return new net::URLRequestTestJob(request,
- test_fixture_->response_headers_,
- test_fixture_->response_data_,
- false);
+ return new net::URLRequestTestJob(
+ request,
+ request->context()->network_delegate(),
+ test_fixture_->response_headers_,
+ test_fixture_->response_data_,
+ false);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698