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

Unified Diff: net/url_request/file_protocol_handler.cc

Issue 22795006: Remove WorkerPool dependency from URLRequestFileJob. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 7 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 | « net/url_request/file_protocol_handler.h ('k') | net/url_request/url_request_context_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/file_protocol_handler.cc
diff --git a/net/url_request/file_protocol_handler.cc b/net/url_request/file_protocol_handler.cc
index dc5b16f1bbe59c082a4f2e575f05236ba2d0c0ac..ef8096f8798cabc09b18e6d6fd3000c5b493d2ad 100644
--- a/net/url_request/file_protocol_handler.cc
+++ b/net/url_request/file_protocol_handler.cc
@@ -5,6 +5,7 @@
#include "net/url_request/file_protocol_handler.h"
#include "base/logging.h"
+#include "base/task_runner.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "net/url_request/url_request.h"
@@ -14,7 +15,11 @@
namespace net {
-FileProtocolHandler::FileProtocolHandler() { }
+FileProtocolHandler::FileProtocolHandler(
+ const scoped_refptr<base::TaskRunner>& file_task_runner)
+ : file_task_runner_(file_task_runner) {}
+
+FileProtocolHandler::~FileProtocolHandler() {}
URLRequestJob* FileProtocolHandler::MaybeCreateJob(
URLRequest* request, NetworkDelegate* network_delegate) const {
@@ -41,7 +46,8 @@ URLRequestJob* FileProtocolHandler::MaybeCreateJob(
// Use a regular file request job for all non-directories (including invalid
// file names).
- return new URLRequestFileJob(request, network_delegate, file_path);
+ return new URLRequestFileJob(request, network_delegate, file_path,
+ file_task_runner_);
}
bool FileProtocolHandler::IsSafeRedirectTarget(const GURL& location) const {
« no previous file with comments | « net/url_request/file_protocol_handler.h ('k') | net/url_request/url_request_context_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698