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

Unified Diff: content/test/net/url_request_slow_download_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_slow_download_job.h ('k') | content/test/net/url_request_slow_http_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_slow_download_job.cc
diff --git a/content/test/net/url_request_slow_download_job.cc b/content/test/net/url_request_slow_download_job.cc
index 5fc435dfa34b42b0bcc691645ad291b054980e12..4d69145e24db0a5251f72da37bd71bcac4b95aff 100644
--- a/content/test/net/url_request_slow_download_job.cc
+++ b/content/test/net/url_request_slow_download_job.cc
@@ -15,7 +15,6 @@
#include "net/base/io_buffer.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request.h"
-#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_filter.h"
using content::BrowserThread;
@@ -55,9 +54,11 @@ void URLRequestSlowDownloadJob::AddUrlHandler() {
// static
net::URLRequestJob* URLRequestSlowDownloadJob::Factory(
net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
const std::string& scheme) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- URLRequestSlowDownloadJob* job = new URLRequestSlowDownloadJob(request);
+ URLRequestSlowDownloadJob* job = new URLRequestSlowDownloadJob(
+ request, network_delegate);
if (request->url().spec() != kFinishDownloadUrl)
pending_requests_.Get().insert(job);
return job;
@@ -79,8 +80,9 @@ void URLRequestSlowDownloadJob::FinishPendingRequests() {
}
}
-URLRequestSlowDownloadJob::URLRequestSlowDownloadJob(net::URLRequest* request)
- : net::URLRequestJob(request, request->context()->network_delegate()),
+URLRequestSlowDownloadJob::URLRequestSlowDownloadJob(
+ net::URLRequest* request, net::NetworkDelegate* network_delegate)
+ : net::URLRequestJob(request, network_delegate),
bytes_already_sent_(0),
should_finish_download_(false),
buffer_size_(0),
« no previous file with comments | « content/test/net/url_request_slow_download_job.h ('k') | content/test/net/url_request_slow_http_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698