summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_url_request_job.cc
diff options
context:
space:
mode:
authoradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-09 21:54:26 +0000
committeradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-09 21:54:26 +0000
commit4f61e0e76ac6a0fb034cfd0973d06e5216ada7fc (patch)
treea147b9873e5624ddf99e9f71ec595abad9ce4812 /webkit/fileapi/file_system_url_request_job.cc
parent8d5ddd0a8fa11345e3894e5d58f6fdf395d76fef (diff)
downloadchromium_src-4f61e0e76ac6a0fb034cfd0973d06e5216ada7fc.zip
chromium_src-4f61e0e76ac6a0fb034cfd0973d06e5216ada7fc.tar.gz
chromium_src-4f61e0e76ac6a0fb034cfd0973d06e5216ada7fc.tar.bz2
Several bits of cleanup in FileSystem*URLRequestJob:
- Remove startup_error_ member and delayed error reporting; URLRequestJob properly enqueues NotifyDone calls so that they complete after Start() runs. - Remove origin_url_ members, replace with locals. - Re-organize .h file to call out FilterContext method. Review URL: http://codereview.chromium.org/6458011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74339 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_url_request_job.cc')
-rw-r--r--webkit/fileapi/file_system_url_request_job.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/webkit/fileapi/file_system_url_request_job.cc b/webkit/fileapi/file_system_url_request_job.cc
index c8b1c76..3eb0842 100644
--- a/webkit/fileapi/file_system_url_request_job.cc
+++ b/webkit/fileapi/file_system_url_request_job.cc
@@ -41,7 +41,6 @@ FileSystemURLRequestJob::FileSystemURLRequestJob(
stream_(NULL),
is_directory_(false),
remaining_bytes_(0),
- startup_error_(0),
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)),
file_thread_proxy_(file_thread_proxy) {
@@ -125,27 +124,23 @@ void FileSystemURLRequestJob::SetExtraRequestHeaders(
// We don't support multiple range requests in one single URL request.
// TODO(adamk): decide whether we want to support multiple range
// requests.
- startup_error_ = net::ERR_REQUEST_RANGE_NOT_SATISFIABLE;
+ NotifyFailed(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE);
}
}
}
}
void FileSystemURLRequestJob::StartAsync() {
- if (startup_error_) {
- NotifyFailed(startup_error_);
- return;
- }
-
+ GURL origin_url;
FileSystemType type;
- if (!CrackFileSystemURL(request_->url(), &origin_url_, &type,
+ if (!CrackFileSystemURL(request_->url(), &origin_url, &type,
&relative_file_path_)) {
NotifyFailed(net::ERR_INVALID_URL);
return;
}
path_manager_->GetFileSystemRootPath(
- origin_url_, type, false, // create
+ origin_url, type, false, // create
callback_factory_.NewCallback(&FileSystemURLRequestJob::DidGetRootPath));
}