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

Unified Diff: net/url_request/url_request_test_job.cc

Issue 82273002: Fix various issues in RedirectToFileResourceHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename test fixture Created 6 years, 9 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 | « net/url_request/url_request_test_job.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_test_job.cc
diff --git a/net/url_request/url_request_test_job.cc b/net/url_request/url_request_test_job.cc
index 31a07feaa882b7e518d622fe974557532ff60ca7..422e08030d72d9f0e995480fc62e0b1628e9fe5b 100644
--- a/net/url_request/url_request_test_job.cc
+++ b/net/url_request/url_request_test_job.cc
@@ -24,6 +24,15 @@ typedef std::list<URLRequestTestJob*> URLRequestJobList;
base::LazyInstance<URLRequestJobList>::Leaky
g_pending_jobs = LAZY_INSTANCE_INITIALIZER;
+class TestJobProtocolHandler : public URLRequestJobFactory::ProtocolHandler {
+ public:
+ // URLRequestJobFactory::ProtocolHandler implementation:
+ virtual URLRequestJob* MaybeCreateJob(
+ URLRequest* request, NetworkDelegate* network_delegate) const OVERRIDE {
+ return new URLRequestTestJob(request, network_delegate);
+ }
+};
+
} // namespace
// static getters for known URLs
@@ -98,10 +107,9 @@ std::string URLRequestTestJob::test_error_headers() {
}
// static
-URLRequestJob* URLRequestTestJob::Factory(URLRequest* request,
- NetworkDelegate* network_delegate,
- const std::string& scheme) {
- return new URLRequestTestJob(request, network_delegate);
+URLRequestJobFactory::ProtocolHandler*
+URLRequestTestJob::CreateProtocolHandler() {
+ return new TestJobProtocolHandler();
}
URLRequestTestJob::URLRequestTestJob(URLRequest* request,
« no previous file with comments | « net/url_request/url_request_test_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698