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

Unified Diff: net/url_request/url_request_file_job.cc

Issue 11931024: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r198785) Created 7 years, 7 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_file_job.h ('k') | net/url_request/url_request_ftp_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_file_job.cc
diff --git a/net/url_request/url_request_file_job.cc b/net/url_request/url_request_file_job.cc
index 979759cecde7221ee269a9bd742de07f2576f226..29cc28df480fdf0a1daffebc598188730cf2d0b9 100644
--- a/net/url_request/url_request_file_job.cc
+++ b/net/url_request/url_request_file_job.cc
@@ -62,34 +62,6 @@ URLRequestFileJob::URLRequestFileJob(URLRequest* request,
weak_ptr_factory_(this) {
}
-// static
-URLRequestJob* URLRequestFileJob::Factory(URLRequest* request,
- NetworkDelegate* network_delegate,
- const std::string& scheme) {
- base::FilePath file_path;
- const bool is_file = FileURLToFilePath(request->url(), &file_path);
-
- // Check file access permissions.
- if (!network_delegate ||
- !network_delegate->CanAccessFile(*request, file_path)) {
- return new URLRequestErrorJob(request, network_delegate, ERR_ACCESS_DENIED);
- }
- // We need to decide whether to create URLRequestFileJob for file access or
- // URLRequestFileDirJob for directory access. To avoid accessing the
- // filesystem, we only look at the path string here.
- // The code in the URLRequestFileJob::Start() method discovers that a path,
- // which doesn't end with a slash, should really be treated as a directory,
- // and it then redirects to the URLRequestFileDirJob.
- if (is_file &&
- file_path.EndsWithSeparator() &&
- file_path.IsAbsolute())
- return new URLRequestFileDirJob(request, network_delegate, file_path);
-
- // Use a regular file request job for all non-directories (including invalid
- // file names).
- return new URLRequestFileJob(request, network_delegate, file_path);
-}
-
void URLRequestFileJob::Start() {
FileMetaInfo* meta_info = new FileMetaInfo();
base::WorkerPool::PostTaskAndReply(
« no previous file with comments | « net/url_request/url_request_file_job.h ('k') | net/url_request/url_request_ftp_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698