Index: storage/browser/fileapi/file_system_url_request_job.cc |
diff --git a/webkit/browser/fileapi/file_system_url_request_job.cc b/storage/browser/fileapi/file_system_url_request_job.cc |
similarity index 89% |
rename from webkit/browser/fileapi/file_system_url_request_job.cc |
rename to storage/browser/fileapi/file_system_url_request_job.cc |
index d8f610d57447874674afff14af00409267dfe8d1..804ac9b6493729ea1429ccce6edd3e65b937d6fc 100644 |
--- a/webkit/browser/fileapi/file_system_url_request_job.cc |
+++ b/storage/browser/fileapi/file_system_url_request_job.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "webkit/browser/fileapi/file_system_url_request_job.h" |
+#include "storage/browser/fileapi/file_system_url_request_job.h" |
#include <vector> |
@@ -25,17 +25,17 @@ |
#include "net/http/http_util.h" |
#include "net/url_request/url_request.h" |
#include "url/gurl.h" |
-#include "webkit/browser/blob/file_stream_reader.h" |
-#include "webkit/browser/fileapi/file_system_context.h" |
-#include "webkit/browser/fileapi/file_system_operation_runner.h" |
-#include "webkit/common/fileapi/file_system_util.h" |
+#include "storage/browser/blob/file_stream_reader.h" |
+#include "storage/browser/fileapi/file_system_context.h" |
+#include "storage/browser/fileapi/file_system_operation_runner.h" |
+#include "storage/common/fileapi/file_system_util.h" |
using net::NetworkDelegate; |
using net::URLRequest; |
using net::URLRequestJob; |
using net::URLRequestStatus; |
-namespace fileapi { |
+namespace storage { |
static net::HttpResponseHeaders* CreateHttpResponseHeaders() { |
// HttpResponseHeaders expects its input string to be terminated by two NULs. |
@@ -66,7 +66,8 @@ FileSystemURLRequestJob::FileSystemURLRequestJob( |
weak_factory_(this) { |
} |
-FileSystemURLRequestJob::~FileSystemURLRequestJob() {} |
+FileSystemURLRequestJob::~FileSystemURLRequestJob() { |
+} |
void FileSystemURLRequestJob::Start() { |
base::MessageLoop::current()->PostTask( |
@@ -81,8 +82,9 @@ void FileSystemURLRequestJob::Kill() { |
weak_factory_.InvalidateWeakPtrs(); |
} |
-bool FileSystemURLRequestJob::ReadRawData(net::IOBuffer* dest, int dest_size, |
- int *bytes_read) { |
+bool FileSystemURLRequestJob::ReadRawData(net::IOBuffer* dest, |
+ int dest_size, |
+ int* bytes_read) { |
DCHECK_NE(dest_size, 0); |
DCHECK(bytes_read); |
DCHECK_GE(remaining_bytes_, 0); |
@@ -98,7 +100,8 @@ bool FileSystemURLRequestJob::ReadRawData(net::IOBuffer* dest, int dest_size, |
return true; |
} |
- const int rv = reader_->Read(dest, dest_size, |
+ const int rv = reader_->Read(dest, |
+ dest_size, |
base::Bind(&FileSystemURLRequestJob::DidRead, |
weak_factory_.GetWeakPtr())); |
if (rv >= 0) { |
@@ -190,8 +193,9 @@ void FileSystemURLRequestJob::DidGetMetadata( |
base::File::Error error_code, |
const base::File::Info& file_info) { |
if (error_code != base::File::FILE_OK) { |
- NotifyFailed(error_code == base::File::FILE_ERROR_INVALID_URL ? |
- net::ERR_INVALID_URL : net::ERR_FILE_NOT_FOUND); |
+ NotifyFailed(error_code == base::File::FILE_ERROR_INVALID_URL |
+ ? net::ERR_INVALID_URL |
+ : net::ERR_FILE_NOT_FOUND); |
return; |
} |
@@ -211,8 +215,8 @@ void FileSystemURLRequestJob::DidGetMetadata( |
return; |
} |
- remaining_bytes_ = byte_range_.last_byte_position() - |
- byte_range_.first_byte_position() + 1; |
+ remaining_bytes_ = |
+ byte_range_.last_byte_position() - byte_range_.first_byte_position() + 1; |
DCHECK_GE(remaining_bytes_, 0); |
DCHECK(!reader_.get()); |
@@ -260,4 +264,4 @@ void FileSystemURLRequestJob::NotifyFailed(int rv) { |
NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv)); |
} |
-} // namespace fileapi |
+} // namespace storage |