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

Unified Diff: webkit/fileapi/file_system_url_request_job.cc

Issue 8999017: Add CreateFileSystemOperation() method to FileSystemContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang build fix Created 8 years, 11 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 | « webkit/fileapi/file_system_operation_interface.h ('k') | webkit/fileapi/sandbox_mount_point_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_url_request_job.cc
diff --git a/webkit/fileapi/file_system_url_request_job.cc b/webkit/fileapi/file_system_url_request_job.cc
index a617d6a90e2574645d331a94c528847bcf8b6b1b..d01dc400343e886080ac1090e14b0dff7c4d6b00 100644
--- a/webkit/fileapi/file_system_url_request_job.cc
+++ b/webkit/fileapi/file_system_url_request_job.cc
@@ -23,6 +23,7 @@
#include "net/http/http_util.h"
#include "net/url_request/url_request.h"
#include "webkit/fileapi/file_system_callback_dispatcher.h"
+#include "webkit/fileapi/file_system_context.h"
#include "webkit/fileapi/file_system_operation.h"
#include "webkit/fileapi/file_system_util.h"
@@ -219,12 +220,19 @@ int FileSystemURLRequestJob::GetResponseCode() const {
}
void FileSystemURLRequestJob::StartAsync() {
- if (request_) {
- (new FileSystemOperation(CallbackDispatcher::Create(this),
- file_thread_proxy_,
- file_system_context_)
- )->GetMetadata(request_->url());
+ if (!request_)
+ return;
+ FileSystemOperationInterface* operation =
+ file_system_context_->CreateFileSystemOperation(
+ request_->url(),
+ CallbackDispatcher::Create(this),
+ file_thread_proxy_);
+ if (!operation) {
+ NotifyDone(URLRequestStatus(URLRequestStatus::FAILED,
+ net::ERR_INVALID_URL));
+ return;
}
+ operation->GetMetadata(request_->url());
}
void FileSystemURLRequestJob::DidGetMetadata(
« no previous file with comments | « webkit/fileapi/file_system_operation_interface.h ('k') | webkit/fileapi/sandbox_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698