summaryrefslogtreecommitdiffstats
path: root/webkit/browser/fileapi
diff options
context:
space:
mode:
authorpilgrim@chromium.org <pilgrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-22 19:58:31 +0000
committerpilgrim@chromium.org <pilgrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-22 20:01:57 +0000
commitcd501a7565dd6054a120fbfe62d45b2299cfcc3b (patch)
treeefe35c31d00f40b2fa9e6dbafd5f9f694f47367e /webkit/browser/fileapi
parent604e202d3548b701900c3771f9517103bb91486c (diff)
downloadchromium_src-cd501a7565dd6054a120fbfe62d45b2299cfcc3b.zip
chromium_src-cd501a7565dd6054a120fbfe62d45b2299cfcc3b.tar.gz
chromium_src-cd501a7565dd6054a120fbfe62d45b2299cfcc3b.tar.bz2
Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single storage namespace
As discussed here: https://groups.google.com/a/chromium.org/forum/#!topic/storage-dev/aQall8GOrS4 BUG=338338 TBR=cevans NOTRY=true Review URL: https://codereview.chromium.org/492873002 Cr-Commit-Position: refs/heads/master@{#291485} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291485 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/browser/fileapi')
-rw-r--r--webkit/browser/fileapi/async_file_util.h9
-rw-r--r--webkit/browser/fileapi/async_file_util_adapter.cc8
-rw-r--r--webkit/browser/fileapi/async_file_util_adapter.h4
-rw-r--r--webkit/browser/fileapi/copy_or_move_file_validator.h4
-rw-r--r--webkit/browser/fileapi/copy_or_move_operation_delegate.cc30
-rw-r--r--webkit/browser/fileapi/copy_or_move_operation_delegate.h10
-rw-r--r--webkit/browser/fileapi/dragged_file_util.cc4
-rw-r--r--webkit/browser/fileapi/dragged_file_util.h4
-rw-r--r--webkit/browser/fileapi/dump_file_system.cc12
-rw-r--r--webkit/browser/fileapi/external_mount_points.cc25
-rw-r--r--webkit/browser/fileapi/external_mount_points.h4
-rw-r--r--webkit/browser/fileapi/file_observers.h4
-rw-r--r--webkit/browser/fileapi/file_permission_policy.h4
-rw-r--r--webkit/browser/fileapi/file_stream_writer.h4
-rw-r--r--webkit/browser/fileapi/file_system_backend.h10
-rw-r--r--webkit/browser/fileapi/file_system_context.cc44
-rw-r--r--webkit/browser/fileapi/file_system_context.h18
-rw-r--r--webkit/browser/fileapi/file_system_dir_url_request_job.cc4
-rw-r--r--webkit/browser/fileapi/file_system_dir_url_request_job.h4
-rw-r--r--webkit/browser/fileapi/file_system_file_stream_reader.cc23
-rw-r--r--webkit/browser/fileapi/file_system_file_stream_reader.h14
-rw-r--r--webkit/browser/fileapi/file_system_file_util.cc4
-rw-r--r--webkit/browser/fileapi/file_system_file_util.h6
-rw-r--r--webkit/browser/fileapi/file_system_operation.h10
-rw-r--r--webkit/browser/fileapi/file_system_operation_context.cc10
-rw-r--r--webkit/browser/fileapi/file_system_operation_context.h10
-rw-r--r--webkit/browser/fileapi/file_system_operation_impl.cc15
-rw-r--r--webkit/browser/fileapi/file_system_operation_impl.h14
-rw-r--r--webkit/browser/fileapi/file_system_operation_runner.cc14
-rw-r--r--webkit/browser/fileapi/file_system_operation_runner.h8
-rw-r--r--webkit/browser/fileapi/file_system_options.cc4
-rw-r--r--webkit/browser/fileapi/file_system_options.h4
-rw-r--r--webkit/browser/fileapi/file_system_quota_client.cc26
-rw-r--r--webkit/browser/fileapi/file_system_quota_client.h31
-rw-r--r--webkit/browser/fileapi/file_system_quota_util.h24
-rw-r--r--webkit/browser/fileapi/file_system_url.cc4
-rw-r--r--webkit/browser/fileapi/file_system_url.h4
-rw-r--r--webkit/browser/fileapi/file_system_url_request_job.cc4
-rw-r--r--webkit/browser/fileapi/file_system_url_request_job.h8
-rw-r--r--webkit/browser/fileapi/file_system_url_request_job_factory.cc4
-rw-r--r--webkit/browser/fileapi/file_system_url_request_job_factory.h4
-rw-r--r--webkit/browser/fileapi/file_system_usage_cache.cc4
-rw-r--r--webkit/browser/fileapi/file_system_usage_cache.h4
-rw-r--r--webkit/browser/fileapi/file_writer_delegate.cc4
-rw-r--r--webkit/browser/fileapi/file_writer_delegate.h4
-rw-r--r--webkit/browser/fileapi/isolated_context.cc4
-rw-r--r--webkit/browser/fileapi/isolated_context.h6
-rw-r--r--webkit/browser/fileapi/isolated_file_system_backend.cc18
-rw-r--r--webkit/browser/fileapi/isolated_file_system_backend.h8
-rw-r--r--webkit/browser/fileapi/local_file_stream_writer.cc4
-rw-r--r--webkit/browser/fileapi/local_file_stream_writer.h4
-rw-r--r--webkit/browser/fileapi/local_file_util.cc20
-rw-r--r--webkit/browser/fileapi/local_file_util.h6
-rw-r--r--webkit/browser/fileapi/mount_points.cc5
-rw-r--r--webkit/browser/fileapi/mount_points.h8
-rw-r--r--webkit/browser/fileapi/native_file_util.cc4
-rw-r--r--webkit/browser/fileapi/native_file_util.h4
-rw-r--r--webkit/browser/fileapi/obfuscated_file_util.cc39
-rw-r--r--webkit/browser/fileapi/obfuscated_file_util.h27
-rw-r--r--webkit/browser/fileapi/open_file_system_mode.h4
-rw-r--r--webkit/browser/fileapi/plugin_private_file_system_backend.cc20
-rw-r--r--webkit/browser/fileapi/plugin_private_file_system_backend.h14
-rw-r--r--webkit/browser/fileapi/quota/open_file_handle.cc4
-rw-r--r--webkit/browser/fileapi/quota/open_file_handle.h4
-rw-r--r--webkit/browser/fileapi/quota/open_file_handle_context.cc4
-rw-r--r--webkit/browser/fileapi/quota/open_file_handle_context.h4
-rw-r--r--webkit/browser/fileapi/quota/quota_backend_impl.cc18
-rw-r--r--webkit/browser/fileapi/quota/quota_backend_impl.h21
-rw-r--r--webkit/browser/fileapi/quota/quota_reservation.cc4
-rw-r--r--webkit/browser/fileapi/quota/quota_reservation.h4
-rw-r--r--webkit/browser/fileapi/quota/quota_reservation_buffer.cc5
-rw-r--r--webkit/browser/fileapi/quota/quota_reservation_buffer.h6
-rw-r--r--webkit/browser/fileapi/quota/quota_reservation_manager.cc4
-rw-r--r--webkit/browser/fileapi/quota/quota_reservation_manager.h4
-rw-r--r--webkit/browser/fileapi/recursive_operation_delegate.cc4
-rw-r--r--webkit/browser/fileapi/recursive_operation_delegate.h4
-rw-r--r--webkit/browser/fileapi/remove_operation_delegate.cc4
-rw-r--r--webkit/browser/fileapi/remove_operation_delegate.h4
-rw-r--r--webkit/browser/fileapi/sandbox_directory_database.cc55
-rw-r--r--webkit/browser/fileapi/sandbox_directory_database.h4
-rw-r--r--webkit/browser/fileapi/sandbox_file_stream_writer.cc15
-rw-r--r--webkit/browser/fileapi/sandbox_file_stream_writer.h11
-rw-r--r--webkit/browser/fileapi/sandbox_file_system_backend.cc30
-rw-r--r--webkit/browser/fileapi/sandbox_file_system_backend.h8
-rw-r--r--webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc53
-rw-r--r--webkit/browser/fileapi/sandbox_file_system_backend_delegate.h20
-rw-r--r--webkit/browser/fileapi/sandbox_isolated_origin_database.cc4
-rw-r--r--webkit/browser/fileapi/sandbox_isolated_origin_database.h4
-rw-r--r--webkit/browser/fileapi/sandbox_origin_database.cc4
-rw-r--r--webkit/browser/fileapi/sandbox_origin_database.h4
-rw-r--r--webkit/browser/fileapi/sandbox_origin_database_interface.cc4
-rw-r--r--webkit/browser/fileapi/sandbox_origin_database_interface.h4
-rw-r--r--webkit/browser/fileapi/sandbox_prioritized_origin_database.cc4
-rw-r--r--webkit/browser/fileapi/sandbox_prioritized_origin_database.h4
-rw-r--r--webkit/browser/fileapi/sandbox_quota_observer.cc15
-rw-r--r--webkit/browser/fileapi/sandbox_quota_observer.h17
-rw-r--r--webkit/browser/fileapi/task_runner_bound_observer_list.h4
-rw-r--r--webkit/browser/fileapi/timed_task_helper.cc4
-rw-r--r--webkit/browser/fileapi/timed_task_helper.h4
-rw-r--r--webkit/browser/fileapi/transient_file_util.cc6
-rw-r--r--webkit/browser/fileapi/transient_file_util.h6
101 files changed, 517 insertions, 527 deletions
diff --git a/webkit/browser/fileapi/async_file_util.h b/webkit/browser/fileapi/async_file_util.h
index bde0339..493d7b2a 100644
--- a/webkit/browser/fileapi/async_file_util.h
+++ b/webkit/browser/fileapi/async_file_util.h
@@ -20,11 +20,11 @@ namespace base {
class Time;
}
-namespace webkit_blob {
+namespace storage {
class ShareableFileReference;
}
-namespace fileapi {
+namespace storage {
class FileSystemOperationContext;
class FileSystemURL;
@@ -74,10 +74,9 @@ class AsyncFileUtil {
void(base::File::Error result,
const base::File::Info& file_info,
const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref)>
+ const scoped_refptr<storage::ShareableFileReference>& file_ref)>
CreateSnapshotFileCallback;
-
typedef base::Callback<void(int64 size)> CopyFileProgressCallback;
typedef FileSystemOperation::CopyOrMoveOption CopyOrMoveOption;
@@ -362,6 +361,6 @@ class AsyncFileUtil {
DISALLOW_COPY_AND_ASSIGN(AsyncFileUtil);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_ASYNC_FILE_UTIL_H_
diff --git a/webkit/browser/fileapi/async_file_util_adapter.cc b/webkit/browser/fileapi/async_file_util_adapter.cc
index 5a99eff..62244b7 100644
--- a/webkit/browser/fileapi/async_file_util_adapter.cc
+++ b/webkit/browser/fileapi/async_file_util_adapter.cc
@@ -21,9 +21,9 @@ using base::Bind;
using base::Callback;
using base::Owned;
using base::Unretained;
-using webkit_blob::ShareableFileReference;
+using storage::ShareableFileReference;
-namespace fileapi {
+namespace storage {
namespace {
@@ -79,7 +79,7 @@ class GetFileInfoHelper {
base::File::Error error_;
base::File::Info file_info_;
base::FilePath platform_path_;
- webkit_blob::ScopedFile scoped_file_;
+ storage::ScopedFile scoped_file_;
DISALLOW_COPY_AND_ASSIGN(GetFileInfoHelper);
};
@@ -349,4 +349,4 @@ void AsyncFileUtilAdapter::CreateSnapshotFile(
DCHECK(success);
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/async_file_util_adapter.h b/webkit/browser/fileapi/async_file_util_adapter.h
index 8e90e5d..e76b6c1 100644
--- a/webkit/browser/fileapi/async_file_util_adapter.h
+++ b/webkit/browser/fileapi/async_file_util_adapter.h
@@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "webkit/browser/fileapi/async_file_util.h"
-namespace fileapi {
+namespace storage {
class FileSystemFileUtil;
@@ -113,6 +113,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AsyncFileUtilAdapter
DISALLOW_COPY_AND_ASSIGN(AsyncFileUtilAdapter);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_ASYNC_FILE_UTIL_ADAPTER_H_
diff --git a/webkit/browser/fileapi/copy_or_move_file_validator.h b/webkit/browser/fileapi/copy_or_move_file_validator.h
index 5312fb0..9681950 100644
--- a/webkit/browser/fileapi/copy_or_move_file_validator.h
+++ b/webkit/browser/fileapi/copy_or_move_file_validator.h
@@ -13,7 +13,7 @@ namespace base {
class FilePath;
}
-namespace fileapi {
+namespace storage {
class FileSystemURL;
@@ -49,6 +49,6 @@ class CopyOrMoveFileValidatorFactory {
const base::FilePath& platform_path) = 0;
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_FILE_VALIDATOR_H_
diff --git a/webkit/browser/fileapi/copy_or_move_operation_delegate.cc b/webkit/browser/fileapi/copy_or_move_operation_delegate.cc
index 392b0e2..97de4f4 100644
--- a/webkit/browser/fileapi/copy_or_move_operation_delegate.cc
+++ b/webkit/browser/fileapi/copy_or_move_operation_delegate.cc
@@ -18,7 +18,7 @@
#include "webkit/common/blob/shareable_file_reference.h"
#include "webkit/common/fileapi/file_system_util.h"
-namespace fileapi {
+namespace storage {
const int64 kFlushIntervalInBytes = 10 << 20; // 10MB.
@@ -131,7 +131,7 @@ class SnapshotCopyOrMoveImpl
base::File::Error error,
const base::File::Info& file_info,
const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
+ const scoped_refptr<storage::ShareableFileReference>& file_ref) {
if (cancel_requested_)
error = base::File::FILE_ERROR_ABORT;
@@ -162,7 +162,7 @@ class SnapshotCopyOrMoveImpl
void RunAfterPreWriteValidation(
const base::FilePath& platform_path,
const base::File::Info& file_info,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref,
+ const scoped_refptr<storage::ShareableFileReference>& file_ref,
const CopyOrMoveOperationDelegate::StatusCallback& callback,
base::File::Error error) {
if (cancel_requested_)
@@ -183,7 +183,7 @@ class SnapshotCopyOrMoveImpl
void RunAfterCopyInForeignFile(
const base::File::Info& file_info,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref,
+ const scoped_refptr<storage::ShareableFileReference>& file_ref,
const CopyOrMoveOperationDelegate::StatusCallback& callback,
base::File::Error error) {
if (cancel_requested_)
@@ -310,7 +310,7 @@ class SnapshotCopyOrMoveImpl
base::File::Error error,
const base::File::Info& file_info,
const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
+ const scoped_refptr<storage::ShareableFileReference>& file_ref) {
if (cancel_requested_)
error = base::File::FILE_ERROR_ABORT;
@@ -331,7 +331,7 @@ class SnapshotCopyOrMoveImpl
// |file_ref| is unused; it is passed here to make sure the reference is
// alive until after post-write validation is complete.
void DidPostWriteValidation(
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref,
+ const scoped_refptr<storage::ShareableFileReference>& file_ref,
const CopyOrMoveOperationDelegate::StatusCallback& callback,
base::File::Error error) {
callback.Run(error);
@@ -370,7 +370,7 @@ class StreamCopyOrMoveImpl
const FileSystemURL& src_url,
const FileSystemURL& dest_url,
CopyOrMoveOperationDelegate::CopyOrMoveOption option,
- scoped_ptr<webkit_blob::FileStreamReader> reader,
+ scoped_ptr<storage::FileStreamReader> reader,
scoped_ptr<FileStreamWriter> writer,
const FileSystemOperation::CopyFileProgressCallback&
file_progress_callback)
@@ -383,8 +383,7 @@ class StreamCopyOrMoveImpl
writer_(writer.Pass()),
file_progress_callback_(file_progress_callback),
cancel_requested_(false),
- weak_factory_(this) {
- }
+ weak_factory_(this) {}
virtual void Run(
const CopyOrMoveOperationDelegate::StatusCallback& callback) OVERRIDE {
@@ -443,7 +442,7 @@ class StreamCopyOrMoveImpl
}
const bool need_flush = dest_url_.mount_option().copy_sync_option() ==
- fileapi::COPY_SYNC_OPTION_SYNC;
+ storage::COPY_SYNC_OPTION_SYNC;
DCHECK(!copy_helper_);
copy_helper_.reset(
@@ -520,7 +519,7 @@ class StreamCopyOrMoveImpl
FileSystemURL src_url_;
FileSystemURL dest_url_;
CopyOrMoveOperationDelegate::CopyOrMoveOption option_;
- scoped_ptr<webkit_blob::FileStreamReader> reader_;
+ scoped_ptr<storage::FileStreamReader> reader_;
scoped_ptr<FileStreamWriter> writer_;
FileSystemOperation::CopyFileProgressCallback file_progress_callback_;
scoped_ptr<CopyOrMoveOperationDelegate::StreamCopyHelper> copy_helper_;
@@ -532,12 +531,11 @@ class StreamCopyOrMoveImpl
} // namespace
CopyOrMoveOperationDelegate::StreamCopyHelper::StreamCopyHelper(
- scoped_ptr<webkit_blob::FileStreamReader> reader,
+ scoped_ptr<storage::FileStreamReader> reader,
scoped_ptr<FileStreamWriter> writer,
bool need_flush,
int buffer_size,
- const FileSystemOperation::CopyFileProgressCallback&
- file_progress_callback,
+ const FileSystemOperation::CopyFileProgressCallback& file_progress_callback,
const base::TimeDelta& min_progress_callback_invocation_span)
: reader_(reader.Pass()),
writer_(writer.Pass()),
@@ -757,7 +755,7 @@ void CopyOrMoveOperationDelegate::ProcessFile(
}
if (!validator_factory) {
- scoped_ptr<webkit_blob::FileStreamReader> reader =
+ scoped_ptr<storage::FileStreamReader> reader =
file_system_context()->CreateFileStreamReader(
src_url, 0, base::Time());
scoped_ptr<FileStreamWriter> writer =
@@ -965,4 +963,4 @@ FileSystemURL CopyOrMoveOperationDelegate::CreateDestURL(
relative);
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/copy_or_move_operation_delegate.h b/webkit/browser/fileapi/copy_or_move_operation_delegate.h
index bb0c1f9..86c6d6a 100644
--- a/webkit/browser/fileapi/copy_or_move_operation_delegate.h
+++ b/webkit/browser/fileapi/copy_or_move_operation_delegate.h
@@ -18,12 +18,12 @@ class DrainableIOBuffer;
class IOBufferWithSize;
}
-namespace webkit_blob {
+namespace storage {
class FileStreamReader;
class ShareableFileReference;
}
-namespace fileapi {
+namespace storage {
class CopyOrMoveFileValidator;
class FileStreamWriter;
@@ -46,7 +46,7 @@ class CopyOrMoveOperationDelegate
class WEBKIT_STORAGE_BROWSER_EXPORT StreamCopyHelper {
public:
StreamCopyHelper(
- scoped_ptr<webkit_blob::FileStreamReader> reader,
+ scoped_ptr<storage::FileStreamReader> reader,
scoped_ptr<FileStreamWriter> writer,
bool need_flush,
int buffer_size,
@@ -76,7 +76,7 @@ class CopyOrMoveOperationDelegate
void Flush(const StatusCallback& callback, bool is_eof);
void DidFlush(const StatusCallback& callback, bool is_eof, int result);
- scoped_ptr<webkit_blob::FileStreamReader> reader_;
+ scoped_ptr<storage::FileStreamReader> reader_;
scoped_ptr<FileStreamWriter> writer_;
const bool need_flush_;
FileSystemOperation::CopyFileProgressCallback file_progress_callback_;
@@ -157,6 +157,6 @@ class CopyOrMoveOperationDelegate
DISALLOW_COPY_AND_ASSIGN(CopyOrMoveOperationDelegate);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_
diff --git a/webkit/browser/fileapi/dragged_file_util.cc b/webkit/browser/fileapi/dragged_file_util.cc
index 0243b3d..59011cb 100644
--- a/webkit/browser/fileapi/dragged_file_util.cc
+++ b/webkit/browser/fileapi/dragged_file_util.cc
@@ -15,7 +15,7 @@
#include "webkit/browser/fileapi/native_file_util.h"
#include "webkit/common/blob/shareable_file_reference.h"
-namespace fileapi {
+namespace storage {
typedef IsolatedContext::MountPointInfo FileInfo;
@@ -102,4 +102,4 @@ scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator>
return scoped_ptr<AbstractFileEnumerator>(new SetFileEnumerator(toplevels));
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/dragged_file_util.h b/webkit/browser/fileapi/dragged_file_util.h
index 8807fc1..712be9c 100644
--- a/webkit/browser/fileapi/dragged_file_util.h
+++ b/webkit/browser/fileapi/dragged_file_util.h
@@ -9,7 +9,7 @@
#include "webkit/browser/fileapi/local_file_util.h"
#include "webkit/browser/webkit_storage_browser_export.h"
-namespace fileapi {
+namespace storage {
class FileSystemOperationContext;
@@ -36,6 +36,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE DraggedFileUtil
DISALLOW_COPY_AND_ASSIGN(DraggedFileUtil);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_DRAGGED_FILE_UTIL_H_
diff --git a/webkit/browser/fileapi/dump_file_system.cc b/webkit/browser/fileapi/dump_file_system.cc
index b7d3b13..a70f429 100644
--- a/webkit/browser/fileapi/dump_file_system.cc
+++ b/webkit/browser/fileapi/dump_file_system.cc
@@ -63,7 +63,7 @@ void ShowUsageAndExit(const std::string& arg0) {
} // namespace
-namespace fileapi {
+namespace storage {
static void DumpDirectoryTree(const std::string& origin_name,
base::FilePath origin_dir) {
@@ -158,7 +158,7 @@ static void DumpFileSystem(const base::FilePath& file_system_dir) {
}
}
-} // namespace fileapi
+} // namespace storage
int main(int argc, char* argv[]) {
const char* arg0 = argv[0];
@@ -187,17 +187,17 @@ int main(int argc, char* argv[]) {
if (argc < 2)
ShowUsageAndExit(arg0);
- const base::FilePath file_system_dir = fileapi::StringToFilePath(argv[1]);
+ const base::FilePath file_system_dir = storage::StringToFilePath(argv[1]);
if (!base::DirectoryExists(file_system_dir)) {
- ShowMessageAndExit(fileapi::FilePathToString(file_system_dir) +
+ ShowMessageAndExit(storage::FilePathToString(file_system_dir) +
" is not a filesystem directory");
}
if (argc == 2) {
- fileapi::DumpFileSystem(file_system_dir);
+ storage::DumpFileSystem(file_system_dir);
} else {
for (int i = 2; i < argc; i++) {
- fileapi::DumpOrigin(file_system_dir, argv[i]);
+ storage::DumpOrigin(file_system_dir, argv[i]);
}
}
return 0;
diff --git a/webkit/browser/fileapi/external_mount_points.cc b/webkit/browser/fileapi/external_mount_points.cc
index 3acfd7f..29ea8ae 100644
--- a/webkit/browser/fileapi/external_mount_points.cc
+++ b/webkit/browser/fileapi/external_mount_points.cc
@@ -30,9 +30,9 @@ base::FilePath NormalizeFilePath(const base::FilePath& path) {
return base::FilePath(path_str).NormalizePathSeparators();
}
-bool IsOverlappingMountPathForbidden(fileapi::FileSystemType type) {
- return type != fileapi::kFileSystemTypeNativeMedia &&
- type != fileapi::kFileSystemTypeDeviceMedia;
+bool IsOverlappingMountPathForbidden(storage::FileSystemType type) {
+ return type != storage::kFileSystemTypeNativeMedia &&
+ type != storage::kFileSystemTypeDeviceMedia;
}
// Wrapper around ref-counted ExternalMountPoints that will be used to lazily
@@ -40,17 +40,15 @@ bool IsOverlappingMountPathForbidden(fileapi::FileSystemType type) {
class SystemMountPointsLazyWrapper {
public:
SystemMountPointsLazyWrapper()
- : system_mount_points_(fileapi::ExternalMountPoints::CreateRefCounted()) {
+ : system_mount_points_(storage::ExternalMountPoints::CreateRefCounted()) {
}
~SystemMountPointsLazyWrapper() {}
- fileapi::ExternalMountPoints* get() {
- return system_mount_points_.get();
- }
+ storage::ExternalMountPoints* get() { return system_mount_points_.get(); }
private:
- scoped_refptr<fileapi::ExternalMountPoints> system_mount_points_;
+ scoped_refptr<storage::ExternalMountPoints> system_mount_points_;
};
base::LazyInstance<SystemMountPointsLazyWrapper>::Leaky
@@ -58,7 +56,7 @@ base::LazyInstance<SystemMountPointsLazyWrapper>::Leaky
} // namespace
-namespace fileapi {
+namespace storage {
class ExternalMountPoints::Instance {
public:
@@ -247,11 +245,10 @@ FileSystemURL ExternalMountPoints::CreateExternalFileSystemURL(
const base::FilePath& path) const {
return CreateCrackedFileSystemURL(
origin,
- fileapi::kFileSystemTypeExternal,
+ storage::kFileSystemTypeExternal,
// Avoid using FilePath::Append as path may be an absolute path.
- base::FilePath(
- CreateVirtualRootPath(mount_name).value() +
- base::FilePath::kSeparators[0] + path.value()));
+ base::FilePath(CreateVirtualRootPath(mount_name).value() +
+ base::FilePath::kSeparators[0] + path.value()));
}
void ExternalMountPoints::RevokeAllFileSystems() {
@@ -357,4 +354,4 @@ bool ExternalMountPoints::ValidateNewMountPoint(const std::string& mount_name,
return true;
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/external_mount_points.h b/webkit/browser/fileapi/external_mount_points.h
index 7891375..060ebb1 100644
--- a/webkit/browser/fileapi/external_mount_points.h
+++ b/webkit/browser/fileapi/external_mount_points.h
@@ -20,7 +20,7 @@ namespace base {
class FilePath;
}
-namespace fileapi {
+namespace storage {
class FileSystemURL;
@@ -154,6 +154,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT ExternalMountPoints
DISALLOW_COPY_AND_ASSIGN(ExternalMountPoints);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_EXTERNAL_MOUNT_POINTS_H_
diff --git a/webkit/browser/fileapi/file_observers.h b/webkit/browser/fileapi/file_observers.h
index c791503..74a4607 100644
--- a/webkit/browser/fileapi/file_observers.h
+++ b/webkit/browser/fileapi/file_observers.h
@@ -10,7 +10,7 @@
// TODO(kinuko): Split this file into per-observer multiple files.
-namespace fileapi {
+namespace storage {
class FileSystemURL;
@@ -78,6 +78,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileChangeObserver {
DISALLOW_COPY_AND_ASSIGN(FileChangeObserver);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_OBSERVERS_H_
diff --git a/webkit/browser/fileapi/file_permission_policy.h b/webkit/browser/fileapi/file_permission_policy.h
index f1b6376..20fd551 100644
--- a/webkit/browser/fileapi/file_permission_policy.h
+++ b/webkit/browser/fileapi/file_permission_policy.h
@@ -7,7 +7,7 @@
#include "webkit/browser/webkit_storage_browser_export.h"
-namespace fileapi {
+namespace storage {
enum FilePermissionPolicy {
// Any access should be always denied.
@@ -23,6 +23,6 @@ enum FilePermissionPolicy {
FILE_PERMISSION_USE_FILE_PERMISSION = 1 << 2,
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_PERMISSION_POLICY_H_
diff --git a/webkit/browser/fileapi/file_stream_writer.h b/webkit/browser/fileapi/file_stream_writer.h
index 3a30ab2..deeab58 100644
--- a/webkit/browser/fileapi/file_stream_writer.h
+++ b/webkit/browser/fileapi/file_stream_writer.h
@@ -18,7 +18,7 @@ namespace net {
class IOBuffer;
}
-namespace fileapi {
+namespace storage {
// A generic interface for writing to a file-like object.
class FileStreamWriter {
@@ -82,6 +82,6 @@ class FileStreamWriter {
virtual int Flush(const net::CompletionCallback& callback) = 0;
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_STREAM_WRITER_H_
diff --git a/webkit/browser/fileapi/file_system_backend.h b/webkit/browser/fileapi/file_system_backend.h
index a8cf975..34960ca 100644
--- a/webkit/browser/fileapi/file_system_backend.h
+++ b/webkit/browser/fileapi/file_system_backend.h
@@ -19,11 +19,11 @@
class GURL;
-namespace webkit_blob {
+namespace storage {
class FileStreamReader;
}
-namespace fileapi {
+namespace storage {
class AsyncFileUtil;
class CopyOrMoveFileValidatorFactory;
@@ -105,7 +105,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemBackend {
// ERR_UPLOAD_FILE_CHANGED error.
// This method itself does *not* check if the given path exists and is a
// regular file.
- virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
+ virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
const base::Time& expected_modification_time,
@@ -132,7 +132,7 @@ class ExternalFileSystemBackend : public FileSystemBackend {
// Returns true if |url| is allowed to be accessed.
// This is supposed to perform ExternalFileSystem-specific security
// checks.
- virtual bool IsAccessAllowed(const fileapi::FileSystemURL& url) const = 0;
+ virtual bool IsAccessAllowed(const storage::FileSystemURL& url) const = 0;
// Returns the list of top level directories that are exposed by this
// provider. This list is used to set appropriate child process file access
// permissions.
@@ -153,6 +153,6 @@ class ExternalFileSystemBackend : public FileSystemBackend {
base::FilePath* virtual_path) = 0;
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_
diff --git a/webkit/browser/fileapi/file_system_context.cc b/webkit/browser/fileapi/file_system_context.cc
index 0df0a1df..5d44499 100644
--- a/webkit/browser/fileapi/file_system_context.cc
+++ b/webkit/browser/fileapi/file_system_context.cc
@@ -31,9 +31,9 @@
#include "webkit/common/fileapi/file_system_info.h"
#include "webkit/common/fileapi/file_system_util.h"
-using quota::QuotaClient;
+using storage::QuotaClient;
-namespace fileapi {
+namespace storage {
namespace {
@@ -134,8 +134,8 @@ FileSystemContext::FileSystemContext(
base::SingleThreadTaskRunner* io_task_runner,
base::SequencedTaskRunner* file_task_runner,
ExternalMountPoints* external_mount_points,
- quota::SpecialStoragePolicy* special_storage_policy,
- quota::QuotaManagerProxy* quota_manager_proxy,
+ storage::SpecialStoragePolicy* special_storage_policy,
+ storage::QuotaManagerProxy* quota_manager_proxy,
ScopedVector<FileSystemBackend> additional_backends,
const std::vector<URLRequestAutoMountHandler>& auto_mount_handlers,
const base::FilePath& partition_path,
@@ -143,20 +143,19 @@ FileSystemContext::FileSystemContext(
: io_task_runner_(io_task_runner),
default_file_task_runner_(file_task_runner),
quota_manager_proxy_(quota_manager_proxy),
- sandbox_delegate_(new SandboxFileSystemBackendDelegate(
- quota_manager_proxy,
- file_task_runner,
- partition_path,
- special_storage_policy,
- options)),
- sandbox_backend_(new SandboxFileSystemBackend(
- sandbox_delegate_.get())),
+ sandbox_delegate_(
+ new SandboxFileSystemBackendDelegate(quota_manager_proxy,
+ file_task_runner,
+ partition_path,
+ special_storage_policy,
+ options)),
+ sandbox_backend_(new SandboxFileSystemBackend(sandbox_delegate_.get())),
isolated_backend_(new IsolatedFileSystemBackend()),
- plugin_private_backend_(new PluginPrivateFileSystemBackend(
- file_task_runner,
- partition_path,
- special_storage_policy,
- options)),
+ plugin_private_backend_(
+ new PluginPrivateFileSystemBackend(file_task_runner,
+ partition_path,
+ special_storage_policy,
+ options)),
additional_backends_(additional_backends.Pass()),
auto_mount_handlers_(auto_mount_handlers),
external_mount_points_(external_mount_points),
@@ -419,16 +418,15 @@ void FileSystemContext::DeleteFileSystem(
callback);
}
-scoped_ptr<webkit_blob::FileStreamReader>
-FileSystemContext::CreateFileStreamReader(
+scoped_ptr<storage::FileStreamReader> FileSystemContext::CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
const base::Time& expected_modification_time) {
if (!url.is_valid())
- return scoped_ptr<webkit_blob::FileStreamReader>();
+ return scoped_ptr<storage::FileStreamReader>();
FileSystemBackend* backend = GetFileSystemBackend(url.type());
if (!backend)
- return scoped_ptr<webkit_blob::FileStreamReader>();
+ return scoped_ptr<storage::FileStreamReader>();
return backend->CreateFileStreamReader(
url, offset, expected_modification_time, this);
}
@@ -608,7 +606,7 @@ void FileSystemContext::DidOpenFileSystemForResolveURL(
return;
}
- fileapi::FileSystemInfo info(
+ storage::FileSystemInfo info(
filesystem_name, filesystem_root, url.mount_type());
// Extract the virtual path not containing a filesystem type part from |url|.
@@ -627,4 +625,4 @@ void FileSystemContext::DidOpenFileSystemForResolveURL(
url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info));
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_context.h b/webkit/browser/fileapi/file_system_context.h
index 428ef60..bcae2ff 100644
--- a/webkit/browser/fileapi/file_system_context.h
+++ b/webkit/browser/fileapi/file_system_context.h
@@ -33,7 +33,7 @@ namespace chrome {
class NativeMediaFileUtilTest;
}
-namespace quota {
+namespace storage {
class QuotaManagerProxy;
class SpecialStoragePolicy;
}
@@ -42,12 +42,12 @@ namespace net {
class URLRequest;
}
-namespace webkit_blob {
+namespace storage {
class BlobURLRequestJobTest;
class FileStreamReader;
}
-namespace fileapi {
+namespace storage {
class AsyncFileUtil;
class CopyOrMoveFileValidatorFactory;
@@ -119,8 +119,8 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemContext
base::SingleThreadTaskRunner* io_task_runner,
base::SequencedTaskRunner* file_task_runner,
ExternalMountPoints* external_mount_points,
- quota::SpecialStoragePolicy* special_storage_policy,
- quota::QuotaManagerProxy* quota_manager_proxy,
+ storage::SpecialStoragePolicy* special_storage_policy,
+ storage::QuotaManagerProxy* quota_manager_proxy,
ScopedVector<FileSystemBackend> additional_backends,
const std::vector<URLRequestAutoMountHandler>& auto_mount_handlers,
const base::FilePath& partition_path,
@@ -136,7 +136,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemContext
const GURL& origin_url,
FileSystemType type);
- quota::QuotaManagerProxy* quota_manager_proxy() const {
+ storage::QuotaManagerProxy* quota_manager_proxy() const {
return quota_manager_proxy_.get();
}
@@ -246,7 +246,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemContext
// FileSystemBackend for the URL and call the backend's CreateFileReader.
// The resolved FileSystemBackend could perform further specialization
// depending on the filesystem type pointed by the |url|.
- scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
+ scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
const base::Time& expected_modification_time);
@@ -371,7 +371,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemContext
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
scoped_refptr<base::SequencedTaskRunner> default_file_task_runner_;
- scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_;
+ scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy_;
scoped_ptr<SandboxFileSystemBackendDelegate> sandbox_delegate_;
@@ -417,6 +417,6 @@ struct DefaultContextDeleter {
}
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_
diff --git a/webkit/browser/fileapi/file_system_dir_url_request_job.cc b/webkit/browser/fileapi/file_system_dir_url_request_job.cc
index 97fe83f..acedbce 100644
--- a/webkit/browser/fileapi/file_system_dir_url_request_job.cc
+++ b/webkit/browser/fileapi/file_system_dir_url_request_job.cc
@@ -29,7 +29,7 @@ using net::URLRequest;
using net::URLRequestJob;
using net::URLRequestStatus;
-namespace fileapi {
+namespace storage {
FileSystemDirURLRequestJob::FileSystemDirURLRequestJob(
URLRequest* request,
@@ -157,4 +157,4 @@ void FileSystemDirURLRequestJob::DidReadDirectory(
}
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_dir_url_request_job.h b/webkit/browser/fileapi/file_system_dir_url_request_job.h
index 67e9df3..33ff8db 100644
--- a/webkit/browser/fileapi/file_system_dir_url_request_job.h
+++ b/webkit/browser/fileapi/file_system_dir_url_request_job.h
@@ -16,7 +16,7 @@
#include "webkit/browser/fileapi/file_system_url.h"
#include "webkit/browser/webkit_storage_browser_export.h"
-namespace fileapi {
+namespace storage {
class FileSystemContext;
struct DirectoryEntry;
@@ -64,6 +64,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemDirURLRequestJob
DISALLOW_COPY_AND_ASSIGN(FileSystemDirURLRequestJob);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_
diff --git a/webkit/browser/fileapi/file_system_file_stream_reader.cc b/webkit/browser/fileapi/file_system_file_stream_reader.cc
index 330d011e..aa99ab9 100644
--- a/webkit/browser/fileapi/file_system_file_stream_reader.cc
+++ b/webkit/browser/fileapi/file_system_file_stream_reader.cc
@@ -13,27 +13,24 @@
#include "webkit/browser/fileapi/file_system_context.h"
#include "webkit/browser/fileapi/file_system_operation_runner.h"
-using webkit_blob::FileStreamReader;
+using storage::FileStreamReader;
// TODO(kinuko): Remove this temporary namespace hack after we move both
// blob and fileapi into content namespace.
-namespace webkit_blob {
+namespace storage {
FileStreamReader* FileStreamReader::CreateForFileSystemFile(
- fileapi::FileSystemContext* file_system_context,
- const fileapi::FileSystemURL& url,
+ storage::FileSystemContext* file_system_context,
+ const storage::FileSystemURL& url,
int64 initial_offset,
const base::Time& expected_modification_time) {
- return new fileapi::FileSystemFileStreamReader(
- file_system_context,
- url,
- initial_offset,
- expected_modification_time);
+ return new storage::FileSystemFileStreamReader(
+ file_system_context, url, initial_offset, expected_modification_time);
}
-} // namespace webkit_blob
+} // namespace storage
-namespace fileapi {
+namespace storage {
namespace {
@@ -119,7 +116,7 @@ void FileSystemFileStreamReader::DidCreateSnapshot(
base::File::Error file_error,
const base::File::Info& file_info,
const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
+ const scoped_refptr<storage::ShareableFileReference>& file_ref) {
DCHECK(has_pending_create_snapshot_);
DCHECK(!local_file_reader_.get());
has_pending_create_snapshot_ = false;
@@ -140,4 +137,4 @@ void FileSystemFileStreamReader::DidCreateSnapshot(
callback.Run();
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_file_stream_reader.h b/webkit/browser/fileapi/file_system_file_stream_reader.h
index 3615022..4661b9e 100644
--- a/webkit/browser/fileapi/file_system_file_stream_reader.h
+++ b/webkit/browser/fileapi/file_system_file_stream_reader.h
@@ -23,7 +23,7 @@ namespace content {
class FileSystemFileStreamReaderTest;
}
-namespace fileapi {
+namespace storage {
class FileSystemContext;
@@ -33,7 +33,7 @@ class FileSystemContext;
// on FileSystemOperation::GetSnapshotFile() which may force downloading
// the entire contents for remote files.
class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemFileStreamReader
- : public NON_EXPORTED_BASE(webkit_blob::FileStreamReader) {
+ : public NON_EXPORTED_BASE(storage::FileStreamReader) {
public:
virtual ~FileSystemFileStreamReader();
@@ -44,7 +44,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemFileStreamReader
const net::Int64CompletionCallback& callback) OVERRIDE;
private:
- friend class webkit_blob::FileStreamReader;
+ friend class storage::FileStreamReader;
friend class content::FileSystemFileStreamReaderTest;
FileSystemFileStreamReader(FileSystemContext* file_system_context,
@@ -60,20 +60,20 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemFileStreamReader
base::File::Error file_error,
const base::File::Info& file_info,
const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
+ const scoped_refptr<storage::ShareableFileReference>& file_ref);
scoped_refptr<FileSystemContext> file_system_context_;
FileSystemURL url_;
const int64 initial_offset_;
const base::Time expected_modification_time_;
- scoped_ptr<webkit_blob::FileStreamReader> local_file_reader_;
- scoped_refptr<webkit_blob::ShareableFileReference> snapshot_ref_;
+ scoped_ptr<storage::FileStreamReader> local_file_reader_;
+ scoped_refptr<storage::ShareableFileReference> snapshot_ref_;
bool has_pending_create_snapshot_;
base::WeakPtrFactory<FileSystemFileStreamReader> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(FileSystemFileStreamReader);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_STREAM_READER_H_
diff --git a/webkit/browser/fileapi/file_system_file_util.cc b/webkit/browser/fileapi/file_system_file_util.cc
index 7317b8b..35b1ceb 100644
--- a/webkit/browser/fileapi/file_system_file_util.cc
+++ b/webkit/browser/fileapi/file_system_file_util.cc
@@ -4,7 +4,7 @@
#include "webkit/browser/fileapi/file_system_file_util.h"
-namespace fileapi {
+namespace storage {
base::FilePath FileSystemFileUtil::EmptyFileEnumerator::Next() {
return base::FilePath();
@@ -22,4 +22,4 @@ bool FileSystemFileUtil::EmptyFileEnumerator::IsDirectory() {
return false;
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_file_util.h b/webkit/browser/fileapi/file_system_file_util.h
index 7957bbb..3d29652 100644
--- a/webkit/browser/fileapi/file_system_file_util.h
+++ b/webkit/browser/fileapi/file_system_file_util.h
@@ -16,7 +16,7 @@ namespace base {
class Time;
}
-namespace fileapi {
+namespace storage {
class FileSystemOperationContext;
class FileSystemURL;
@@ -167,7 +167,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
//
// See header comments for AsyncFileUtil::CreateSnapshotFile() for
// more details.
- virtual webkit_blob::ScopedFile CreateSnapshotFile(
+ virtual storage::ScopedFile CreateSnapshotFile(
FileSystemOperationContext* context,
const FileSystemURL& url,
base::File::Error* error,
@@ -181,6 +181,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtil);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_
diff --git a/webkit/browser/fileapi/file_system_operation.h b/webkit/browser/fileapi/file_system_operation.h
index 4261a2b..ececc77 100644
--- a/webkit/browser/fileapi/file_system_operation.h
+++ b/webkit/browser/fileapi/file_system_operation.h
@@ -23,13 +23,13 @@ namespace net {
class URLRequest;
}
-namespace webkit_blob {
+namespace storage {
class ShareableFileReference;
}
class GURL;
-namespace fileapi {
+namespace storage {
class FileSystemContext;
class FileSystemURL;
@@ -117,8 +117,8 @@ class FileSystemOperation {
void(base::File::Error result,
const base::File::Info& file_info,
const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref)>
- SnapshotFileCallback;
+ const scoped_refptr<storage::ShareableFileReference>& file_ref)>
+ SnapshotFileCallback;
// Used for progress update callback for Copy().
//
@@ -480,6 +480,6 @@ class FileSystemOperation {
};
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_
diff --git a/webkit/browser/fileapi/file_system_operation_context.cc b/webkit/browser/fileapi/file_system_operation_context.cc
index dd333ba..1cd1f37 100644
--- a/webkit/browser/fileapi/file_system_operation_context.cc
+++ b/webkit/browser/fileapi/file_system_operation_context.cc
@@ -7,14 +7,15 @@
#include "base/sequenced_task_runner.h"
#include "webkit/browser/fileapi/file_system_context.h"
-namespace fileapi {
+namespace storage {
FileSystemOperationContext::FileSystemOperationContext(
FileSystemContext* context)
: file_system_context_(context),
task_runner_(file_system_context_->default_file_task_runner()),
allowed_bytes_growth_(0),
- quota_limit_type_(quota::kQuotaLimitTypeUnknown) {}
+ quota_limit_type_(storage::kQuotaLimitTypeUnknown) {
+}
FileSystemOperationContext::FileSystemOperationContext(
FileSystemContext* context,
@@ -22,11 +23,12 @@ FileSystemOperationContext::FileSystemOperationContext(
: file_system_context_(context),
task_runner_(task_runner),
allowed_bytes_growth_(0),
- quota_limit_type_(quota::kQuotaLimitTypeUnknown) {}
+ quota_limit_type_(storage::kQuotaLimitTypeUnknown) {
+}
FileSystemOperationContext::~FileSystemOperationContext() {
DetachUserDataThread();
setter_thread_checker_.DetachFromThread();
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_operation_context.h b/webkit/browser/fileapi/file_system_operation_context.h
index decdecb..0428bb4 100644
--- a/webkit/browser/fileapi/file_system_operation_context.h
+++ b/webkit/browser/fileapi/file_system_operation_context.h
@@ -16,7 +16,7 @@ namespace base {
class SequencedTaskRunner;
}
-namespace fileapi {
+namespace storage {
class FileSystemContext;
@@ -50,7 +50,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemOperationContext
// Returns the current remaining quota.
int64 allowed_bytes_growth() const { return allowed_bytes_growth_; }
- quota::QuotaLimitType quota_limit_type() const { return quota_limit_type_; }
+ storage::QuotaLimitType quota_limit_type() const { return quota_limit_type_; }
base::SequencedTaskRunner* task_runner() const { return task_runner_.get(); }
ChangeObserverList* change_observers() { return &change_observers_; }
@@ -67,7 +67,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemOperationContext
DCHECK(setter_thread_checker_.CalledOnValidThread());
update_observers_ = list;
}
- void set_quota_limit_type(quota::QuotaLimitType limit_type) {
+ void set_quota_limit_type(storage::QuotaLimitType limit_type) {
DCHECK(setter_thread_checker_.CalledOnValidThread());
quota_limit_type_ = limit_type;
}
@@ -80,7 +80,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemOperationContext
int64 allowed_bytes_growth_;
// The current quota limit type, used by ObfuscatedFileUtil.
- quota::QuotaLimitType quota_limit_type_;
+ storage::QuotaLimitType quota_limit_type_;
// Observers attached to this context.
ChangeObserverList change_observers_;
@@ -92,6 +92,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemOperationContext
DISALLOW_COPY_AND_ASSIGN(FileSystemOperationContext);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_
diff --git a/webkit/browser/fileapi/file_system_operation_impl.cc b/webkit/browser/fileapi/file_system_operation_impl.cc
index 0f6728c..286f19f 100644
--- a/webkit/browser/fileapi/file_system_operation_impl.cc
+++ b/webkit/browser/fileapi/file_system_operation_impl.cc
@@ -27,9 +27,9 @@
#include "webkit/common/fileapi/file_system_util.h"
#include "webkit/common/quota/quota_types.h"
-using webkit_blob::ScopedFile;
+using storage::ScopedFile;
-namespace fileapi {
+namespace storage {
FileSystemOperation* FileSystemOperation::Create(
const FileSystemURL& url,
@@ -341,7 +341,7 @@ void FileSystemOperationImpl::GetUsageAndQuotaThenRunTask(
const FileSystemURL& url,
const base::Closure& task,
const base::Closure& error_callback) {
- quota::QuotaManagerProxy* quota_manager_proxy =
+ storage::QuotaManagerProxy* quota_manager_proxy =
file_system_context()->quota_manager_proxy();
if (!quota_manager_proxy ||
!file_system_context()->GetQuotaUtil(url.type())) {
@@ -364,9 +364,10 @@ void FileSystemOperationImpl::GetUsageAndQuotaThenRunTask(
void FileSystemOperationImpl::DidGetUsageAndQuotaAndRunTask(
const base::Closure& task,
const base::Closure& error_callback,
- quota::QuotaStatusCode status,
- int64 usage, int64 quota) {
- if (status != quota::kQuotaStatusOk) {
+ storage::QuotaStatusCode status,
+ int64 usage,
+ int64 quota) {
+ if (status != storage::kQuotaStatusOk) {
LOG(WARNING) << "Got unexpected quota error : " << status;
error_callback.Run();
return;
@@ -555,4 +556,4 @@ bool FileSystemOperationImpl::SetPendingOperationType(OperationType type) {
return true;
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_operation_impl.h b/webkit/browser/fileapi/file_system_operation_impl.h
index 5d93cb3..6ad33d0 100644
--- a/webkit/browser/fileapi/file_system_operation_impl.h
+++ b/webkit/browser/fileapi/file_system_operation_impl.h
@@ -18,7 +18,7 @@
#include "webkit/common/blob/scoped_file.h"
#include "webkit/common/quota/quota_types.h"
-namespace fileapi {
+namespace storage {
class AsyncFileUtil;
class FileSystemContext;
@@ -118,11 +118,11 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOperationImpl
// Sets the quota info in the operation_context_ and then runs the given
// |task| if the returned quota status is successful, otherwise runs
// |error_callback|.
- void DidGetUsageAndQuotaAndRunTask(
- const base::Closure& task,
- const base::Closure& error_callback,
- quota::QuotaStatusCode status,
- int64 usage, int64 quota);
+ void DidGetUsageAndQuotaAndRunTask(const base::Closure& task,
+ const base::Closure& error_callback,
+ storage::QuotaStatusCode status,
+ int64 usage,
+ int64 quota);
// The 'body' methods that perform the actual work (i.e. posting the
// file task on proxy_) after the quota check.
@@ -201,6 +201,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOperationImpl
DISALLOW_COPY_AND_ASSIGN(FileSystemOperationImpl);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_
diff --git a/webkit/browser/fileapi/file_system_operation_runner.cc b/webkit/browser/fileapi/file_system_operation_runner.cc
index 1d588a7..0644b2f 100644
--- a/webkit/browser/fileapi/file_system_operation_runner.cc
+++ b/webkit/browser/fileapi/file_system_operation_runner.cc
@@ -16,7 +16,7 @@
#include "webkit/browser/fileapi/file_writer_delegate.h"
#include "webkit/common/blob/shareable_file_reference.h"
-namespace fileapi {
+namespace storage {
typedef FileSystemOperationRunner::OperationID OperationID;
@@ -238,7 +238,7 @@ OperationID FileSystemOperationRunner::Remove(
OperationID FileSystemOperationRunner::Write(
const net::URLRequestContext* url_request_context,
const FileSystemURL& url,
- scoped_ptr<webkit_blob::BlobDataHandle> blob,
+ scoped_ptr<storage::BlobDataHandle> blob,
int64 offset,
const WriteCallback& callback) {
base::File::Error error = base::File::FILE_OK;
@@ -268,10 +268,8 @@ OperationID FileSystemOperationRunner::Write(
new FileWriterDelegate(writer.Pass(), flush_policy));
scoped_ptr<net::URLRequest> blob_request(
- webkit_blob::BlobProtocolHandler::CreateBlobRequest(
- blob.Pass(),
- url_request_context,
- writer_delegate.get()));
+ storage::BlobProtocolHandler::CreateBlobRequest(
+ blob.Pass(), url_request_context, writer_delegate.get()));
PrepareForWrite(handle.id, url);
operation->Write(
@@ -598,7 +596,7 @@ void FileSystemOperationRunner::DidCreateSnapshot(
base::File::Error rv,
const base::File::Info& file_info,
const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
+ const scoped_refptr<storage::ShareableFileReference>& file_ref) {
if (handle.scope) {
finished_operations_.insert(handle.id);
base::MessageLoopProxy::current()->PostTask(
@@ -686,4 +684,4 @@ void FileSystemOperationRunner::FinishOperation(OperationID id) {
}
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_operation_runner.h b/webkit/browser/fileapi/file_system_operation_runner.h
index e943f28..5e593c7 100644
--- a/webkit/browser/fileapi/file_system_operation_runner.h
+++ b/webkit/browser/fileapi/file_system_operation_runner.h
@@ -22,7 +22,7 @@ namespace net {
class URLRequestContext;
}
-namespace fileapi {
+namespace storage {
class FileSystemURL;
class FileSystemContext;
@@ -111,7 +111,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOperationRunner
// |url_request_context| is used to read contents in |blob|.
OperationID Write(const net::URLRequestContext* url_request_context,
const FileSystemURL& url,
- scoped_ptr<webkit_blob::BlobDataHandle> blob,
+ scoped_ptr<storage::BlobDataHandle> blob,
int64 offset,
const WriteCallback& callback);
@@ -279,7 +279,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOperationRunner
base::File::Error rv,
const base::File::Info& file_info,
const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
+ const scoped_refptr<storage::ShareableFileReference>& file_ref);
void OnCopyProgress(
const OperationHandle& handle,
@@ -317,6 +317,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOperationRunner
DISALLOW_COPY_AND_ASSIGN(FileSystemOperationRunner);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_
diff --git a/webkit/browser/fileapi/file_system_options.cc b/webkit/browser/fileapi/file_system_options.cc
index bef2f52..c1d6ff2 100644
--- a/webkit/browser/fileapi/file_system_options.cc
+++ b/webkit/browser/fileapi/file_system_options.cc
@@ -4,7 +4,7 @@
#include "webkit/browser/fileapi/file_system_options.h"
-namespace fileapi {
+namespace storage {
FileSystemOptions::FileSystemOptions(
ProfileMode profile_mode,
@@ -18,4 +18,4 @@ FileSystemOptions::FileSystemOptions(
FileSystemOptions::~FileSystemOptions() {
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_options.h b/webkit/browser/fileapi/file_system_options.h
index 25133da..c1ed7bfe 100644
--- a/webkit/browser/fileapi/file_system_options.h
+++ b/webkit/browser/fileapi/file_system_options.h
@@ -14,7 +14,7 @@ namespace leveldb {
class Env;
}
-namespace fileapi {
+namespace storage {
// Provides runtime options that may change FileSystem API behavior.
// This object is copyable.
@@ -57,6 +57,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOptions {
leveldb::Env* env_override_;
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPTIONS_H_
diff --git a/webkit/browser/fileapi/file_system_quota_client.cc b/webkit/browser/fileapi/file_system_quota_client.cc
index 3dce218..f58a522 100644
--- a/webkit/browser/fileapi/file_system_quota_client.cc
+++ b/webkit/browser/fileapi/file_system_quota_client.cc
@@ -24,9 +24,9 @@
#include "webkit/browser/fileapi/sandbox_file_system_backend.h"
#include "webkit/common/fileapi/file_system_util.h"
-using quota::StorageType;
+using storage::StorageType;
-namespace fileapi {
+namespace storage {
namespace {
@@ -57,25 +57,24 @@ void GetOriginsForHostOnFileTaskRunner(
quota_util->GetOriginsForHostOnFileTaskRunner(type, host, origins_ptr);
}
-void DidGetOrigins(
- const quota::QuotaClient::GetOriginsCallback& callback,
- std::set<GURL>* origins_ptr) {
+void DidGetOrigins(const storage::QuotaClient::GetOriginsCallback& callback,
+ std::set<GURL>* origins_ptr) {
callback.Run(*origins_ptr);
}
-quota::QuotaStatusCode DeleteOriginOnFileTaskRunner(
+storage::QuotaStatusCode DeleteOriginOnFileTaskRunner(
FileSystemContext* context,
const GURL& origin,
FileSystemType type) {
FileSystemBackend* provider = context->GetFileSystemBackend(type);
if (!provider || !provider->GetQuotaUtil())
- return quota::kQuotaErrorNotSupported;
+ return storage::kQuotaErrorNotSupported;
base::File::Error result =
provider->GetQuotaUtil()->DeleteOriginDataOnFileTaskRunner(
context, context->quota_manager_proxy(), origin, type);
if (result == base::File::FILE_OK)
- return quota::kQuotaStatusOk;
- return quota::kQuotaErrorInvalidModification;
+ return storage::kQuotaStatusOk;
+ return storage::kQuotaErrorInvalidModification;
}
} // namespace
@@ -89,8 +88,8 @@ FileSystemQuotaClient::FileSystemQuotaClient(
FileSystemQuotaClient::~FileSystemQuotaClient() {}
-quota::QuotaClient::ID FileSystemQuotaClient::id() const {
- return quota::QuotaClient::kFileSystem;
+storage::QuotaClient::ID FileSystemQuotaClient::id() const {
+ return storage::QuotaClient::kFileSystem;
}
void FileSystemQuotaClient::OnQuotaManagerDestroyed() {
@@ -197,7 +196,8 @@ void FileSystemQuotaClient::DeleteOriginData(
callback);
}
-bool FileSystemQuotaClient::DoesSupport(quota::StorageType storage_type) const {
+bool FileSystemQuotaClient::DoesSupport(
+ storage::StorageType storage_type) const {
FileSystemType type = QuotaStorageTypeToFileSystemType(storage_type);
DCHECK(type != kFileSystemTypeUnknown);
return file_system_context_->IsSandboxFileSystem(type);
@@ -207,4 +207,4 @@ base::SequencedTaskRunner* FileSystemQuotaClient::file_task_runner() const {
return file_system_context_->default_file_task_runner();
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_quota_client.h b/webkit/browser/fileapi/file_system_quota_client.h
index f3cf68d..c520fc2 100644
--- a/webkit/browser/fileapi/file_system_quota_client.h
+++ b/webkit/browser/fileapi/file_system_quota_client.h
@@ -22,7 +22,7 @@ namespace base {
class SequencedTaskRunner;
}
-namespace fileapi {
+namespace storage {
class FileSystemContext;
@@ -32,7 +32,7 @@ class FileSystemContext;
// All of the public methods of this class are called by the quota manager
// (except for the constructor/destructor).
class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemQuotaClient
- : public NON_EXPORTED_BASE(quota::QuotaClient) {
+ : public NON_EXPORTED_BASE(storage::QuotaClient) {
public:
FileSystemQuotaClient(
FileSystemContext* file_system_context,
@@ -40,23 +40,20 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemQuotaClient
virtual ~FileSystemQuotaClient();
// QuotaClient methods.
- virtual quota::QuotaClient::ID id() const OVERRIDE;
+ virtual storage::QuotaClient::ID id() const OVERRIDE;
virtual void OnQuotaManagerDestroyed() OVERRIDE;
virtual void GetOriginUsage(const GURL& origin_url,
- quota::StorageType type,
+ storage::StorageType type,
const GetUsageCallback& callback) OVERRIDE;
- virtual void GetOriginsForType(
- quota::StorageType type,
- const GetOriginsCallback& callback) OVERRIDE;
- virtual void GetOriginsForHost(
- quota::StorageType type,
- const std::string& host,
- const GetOriginsCallback& callback) OVERRIDE;
- virtual void DeleteOriginData(
- const GURL& origin,
- quota::StorageType type,
- const DeletionCallback& callback) OVERRIDE;
- virtual bool DoesSupport(quota::StorageType type) const OVERRIDE;
+ virtual void GetOriginsForType(storage::StorageType type,
+ const GetOriginsCallback& callback) OVERRIDE;
+ virtual void GetOriginsForHost(storage::StorageType type,
+ const std::string& host,
+ const GetOriginsCallback& callback) OVERRIDE;
+ virtual void DeleteOriginData(const GURL& origin,
+ storage::StorageType type,
+ const DeletionCallback& callback) OVERRIDE;
+ virtual bool DoesSupport(storage::StorageType type) const OVERRIDE;
private:
base::SequencedTaskRunner* file_task_runner() const;
@@ -68,6 +65,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemQuotaClient
DISALLOW_COPY_AND_ASSIGN(FileSystemQuotaClient);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_QUOTA_CLIENT_H_
diff --git a/webkit/browser/fileapi/file_system_quota_util.h b/webkit/browser/fileapi/file_system_quota_util.h
index 7e6badf..cffd70a 100644
--- a/webkit/browser/fileapi/file_system_quota_util.h
+++ b/webkit/browser/fileapi/file_system_quota_util.h
@@ -19,11 +19,11 @@ namespace base {
class SequencedTaskRunner;
}
-namespace quota {
+namespace storage {
class QuotaManagerProxy;
}
-namespace fileapi {
+namespace storage {
class FileSystemContext;
class QuotaReservation;
@@ -40,24 +40,22 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemQuotaUtil {
// to the quota manager via |proxy|.
virtual base::File::Error DeleteOriginDataOnFileTaskRunner(
FileSystemContext* context,
- quota::QuotaManagerProxy* proxy,
+ storage::QuotaManagerProxy* proxy,
const GURL& origin_url,
FileSystemType type) = 0;
- virtual void GetOriginsForTypeOnFileTaskRunner(
- fileapi::FileSystemType type,
- std::set<GURL>* origins) = 0;
+ virtual void GetOriginsForTypeOnFileTaskRunner(storage::FileSystemType type,
+ std::set<GURL>* origins) = 0;
- virtual void GetOriginsForHostOnFileTaskRunner(
- fileapi::FileSystemType type,
- const std::string& host,
- std::set<GURL>* origins) = 0;
+ virtual void GetOriginsForHostOnFileTaskRunner(storage::FileSystemType type,
+ const std::string& host,
+ std::set<GURL>* origins) = 0;
// Returns the amount of data used for the origin for usage tracking.
virtual int64 GetOriginUsageOnFileTaskRunner(
- fileapi::FileSystemContext* file_system_context,
+ storage::FileSystemContext* file_system_context,
const GURL& origin_url,
- fileapi::FileSystemType type) = 0;
+ storage::FileSystemType type) = 0;
// Creates new reservation object for the origin and the type.
virtual scoped_refptr<QuotaReservation>
@@ -88,6 +86,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemQuotaUtil {
FileSystemType type) const = 0;
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_
diff --git a/webkit/browser/fileapi/file_system_url.cc b/webkit/browser/fileapi/file_system_url.cc
index 7e879b3..29b2b3fb 100644
--- a/webkit/browser/fileapi/file_system_url.cc
+++ b/webkit/browser/fileapi/file_system_url.cc
@@ -12,7 +12,7 @@
#include "webkit/common/fileapi/file_system_types.h"
#include "webkit/common/fileapi/file_system_util.h"
-namespace fileapi {
+namespace storage {
namespace {
@@ -150,4 +150,4 @@ bool FileSystemURL::Comparator::operator()(const FileSystemURL& lhs,
return lhs.path_ < rhs.path_;
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_url.h b/webkit/browser/fileapi/file_system_url.h
index ead0762..bf69111 100644
--- a/webkit/browser/fileapi/file_system_url.h
+++ b/webkit/browser/fileapi/file_system_url.h
@@ -14,7 +14,7 @@
#include "webkit/common/fileapi/file_system_mount_option.h"
#include "webkit/common/fileapi/file_system_types.h"
-namespace fileapi {
+namespace storage {
// A class representing a filesystem URL which consists of origin URL,
// type and an internal path used inside the filesystem.
@@ -175,6 +175,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemURL {
typedef std::set<FileSystemURL, FileSystemURL::Comparator> FileSystemURLSet;
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_URL_H_
diff --git a/webkit/browser/fileapi/file_system_url_request_job.cc b/webkit/browser/fileapi/file_system_url_request_job.cc
index d8f610d..bdfd931 100644
--- a/webkit/browser/fileapi/file_system_url_request_job.cc
+++ b/webkit/browser/fileapi/file_system_url_request_job.cc
@@ -35,7 +35,7 @@ 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.
@@ -260,4 +260,4 @@ void FileSystemURLRequestJob::NotifyFailed(int rv) {
NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv));
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_url_request_job.h b/webkit/browser/fileapi/file_system_url_request_job.h
index 29b42a5..5aad9e7 100644
--- a/webkit/browser/fileapi/file_system_url_request_job.h
+++ b/webkit/browser/fileapi/file_system_url_request_job.h
@@ -22,11 +22,11 @@ namespace base {
class FilePath;
}
-namespace webkit_blob {
+namespace storage {
class FileStreamReader;
}
-namespace fileapi {
+namespace storage {
class FileSystemContext;
// A request job that handles reading filesystem: URLs
@@ -69,7 +69,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemURLRequestJob
const std::string storage_domain_;
FileSystemContext* file_system_context_;
- scoped_ptr<webkit_blob::FileStreamReader> reader_;
+ scoped_ptr<storage::FileStreamReader> reader_;
FileSystemURL url_;
bool is_directory_;
scoped_ptr<net::HttpResponseInfo> response_info_;
@@ -80,6 +80,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemURLRequestJob
DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJob);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_
diff --git a/webkit/browser/fileapi/file_system_url_request_job_factory.cc b/webkit/browser/fileapi/file_system_url_request_job_factory.cc
index 3add372..6cc3ad0 100644
--- a/webkit/browser/fileapi/file_system_url_request_job_factory.cc
+++ b/webkit/browser/fileapi/file_system_url_request_job_factory.cc
@@ -12,7 +12,7 @@
#include "webkit/browser/fileapi/file_system_dir_url_request_job.h"
#include "webkit/browser/fileapi/file_system_url_request_job.h"
-namespace fileapi {
+namespace storage {
namespace {
@@ -70,4 +70,4 @@ net::URLRequestJobFactory::ProtocolHandler* CreateFileSystemProtocolHandler(
return new FileSystemProtocolHandler(storage_domain, context);
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_url_request_job_factory.h b/webkit/browser/fileapi/file_system_url_request_job_factory.h
index bcc55dc..00b1831 100644
--- a/webkit/browser/fileapi/file_system_url_request_job_factory.h
+++ b/webkit/browser/fileapi/file_system_url_request_job_factory.h
@@ -15,7 +15,7 @@ namespace base {
class MessageLoopProxy;
} // namespace base
-namespace fileapi {
+namespace storage {
class FileSystemContext;
@@ -26,6 +26,6 @@ WEBKIT_STORAGE_BROWSER_EXPORT net::URLRequestJobFactory::ProtocolHandler*
CreateFileSystemProtocolHandler(const std::string& storage_domain,
FileSystemContext* context);
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_FACTORY_H_
diff --git a/webkit/browser/fileapi/file_system_usage_cache.cc b/webkit/browser/fileapi/file_system_usage_cache.cc
index 89c6db1..fa0f78f 100644
--- a/webkit/browser/fileapi/file_system_usage_cache.cc
+++ b/webkit/browser/fileapi/file_system_usage_cache.cc
@@ -14,7 +14,7 @@
#include "base/stl_util.h"
#include "webkit/browser/fileapi/timed_task_helper.h"
-namespace fileapi {
+namespace storage {
namespace {
const int64 kCloseDelaySeconds = 5;
@@ -304,4 +304,4 @@ bool FileSystemUsageCache::HasCacheFileHandle(const base::FilePath& file_path) {
return ContainsKey(cache_files_, file_path);
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_system_usage_cache.h b/webkit/browser/fileapi/file_system_usage_cache.h
index d4451e3..0d268a2 100644
--- a/webkit/browser/fileapi/file_system_usage_cache.h
+++ b/webkit/browser/fileapi/file_system_usage_cache.h
@@ -15,7 +15,7 @@
#include "base/sequenced_task_runner.h"
#include "webkit/browser/webkit_storage_browser_export.h"
-namespace fileapi {
+namespace storage {
class TimedTaskHelper;
@@ -100,6 +100,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemUsageCache {
DISALLOW_COPY_AND_ASSIGN(FileSystemUsageCache);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_USAGE_CACHE_H_
diff --git a/webkit/browser/fileapi/file_writer_delegate.cc b/webkit/browser/fileapi/file_writer_delegate.cc
index 3c88fd2..976debe 100644
--- a/webkit/browser/fileapi/file_writer_delegate.cc
+++ b/webkit/browser/fileapi/file_writer_delegate.cc
@@ -16,7 +16,7 @@
#include "webkit/browser/fileapi/file_system_context.h"
#include "webkit/common/fileapi/file_system_util.h"
-namespace fileapi {
+namespace storage {
static const int kReadBufSize = 32768;
@@ -241,4 +241,4 @@ void FileWriterDelegate::OnFlushed(base::File::Error error,
write_callback_.Run(error, bytes_written, progress_status);
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/file_writer_delegate.h b/webkit/browser/fileapi/file_writer_delegate.h
index e9f3413..2544c5c 100644
--- a/webkit/browser/fileapi/file_writer_delegate.h
+++ b/webkit/browser/fileapi/file_writer_delegate.h
@@ -15,7 +15,7 @@
#include "net/url_request/url_request.h"
#include "webkit/browser/webkit_storage_browser_export.h"
-namespace fileapi {
+namespace storage {
class FileStreamWriter;
@@ -105,6 +105,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileWriterDelegate
DISALLOW_COPY_AND_ASSIGN(FileWriterDelegate);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_
diff --git a/webkit/browser/fileapi/isolated_context.cc b/webkit/browser/fileapi/isolated_context.cc
index a187a05..147e588 100644
--- a/webkit/browser/fileapi/isolated_context.cc
+++ b/webkit/browser/fileapi/isolated_context.cc
@@ -14,7 +14,7 @@
#include "base/strings/stringprintf.h"
#include "webkit/browser/fileapi/file_system_url.h"
-namespace fileapi {
+namespace storage {
namespace {
@@ -481,4 +481,4 @@ std::string IsolatedContext::GetNewFileSystemId() const {
return id;
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/isolated_context.h b/webkit/browser/fileapi/isolated_context.h
index 213082d..5cc141f 100644
--- a/webkit/browser/fileapi/isolated_context.h
+++ b/webkit/browser/fileapi/isolated_context.h
@@ -19,11 +19,11 @@
#include "webkit/browser/webkit_storage_browser_export.h"
#include "webkit/common/fileapi/file_system_types.h"
-namespace fileapi {
+namespace storage {
class FileSystemURL;
}
-namespace fileapi {
+namespace storage {
// Manages isolated filesystem mount points which have no well-known names
// and are identified by a string 'filesystem ID', which usually just looks
@@ -196,6 +196,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT IsolatedContext : public MountPoints {
DISALLOW_COPY_AND_ASSIGN(IsolatedContext);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_ISOLATED_CONTEXT_H_
diff --git a/webkit/browser/fileapi/isolated_file_system_backend.cc b/webkit/browser/fileapi/isolated_file_system_backend.cc
index b31c1f9..b2aee2b 100644
--- a/webkit/browser/fileapi/isolated_file_system_backend.cc
+++ b/webkit/browser/fileapi/isolated_file_system_backend.cc
@@ -26,7 +26,7 @@
#include "webkit/common/fileapi/file_system_types.h"
#include "webkit/common/fileapi/file_system_util.h"
-namespace fileapi {
+namespace storage {
IsolatedFileSystemBackend::IsolatedFileSystemBackend()
: isolated_file_util_(new AsyncFileUtilAdapter(new LocalFileUtil())),
@@ -101,27 +101,29 @@ FileSystemOperation* IsolatedFileSystemBackend::CreateFileSystemOperation(
}
bool IsolatedFileSystemBackend::SupportsStreaming(
- const fileapi::FileSystemURL& url) const {
+ const storage::FileSystemURL& url) const {
return false;
}
bool IsolatedFileSystemBackend::HasInplaceCopyImplementation(
- fileapi::FileSystemType type) const {
+ storage::FileSystemType type) const {
DCHECK(type == kFileSystemTypeNativeLocal || type == kFileSystemTypeDragged ||
type == kFileSystemTypeForTransientFile);
return false;
}
-scoped_ptr<webkit_blob::FileStreamReader>
+scoped_ptr<storage::FileStreamReader>
IsolatedFileSystemBackend::CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
const base::Time& expected_modification_time,
FileSystemContext* context) const {
- return scoped_ptr<webkit_blob::FileStreamReader>(
- webkit_blob::FileStreamReader::CreateForLocalFile(
+ return scoped_ptr<storage::FileStreamReader>(
+ storage::FileStreamReader::CreateForLocalFile(
context->default_file_task_runner(),
- url.path(), offset, expected_modification_time));
+ url.path(),
+ offset,
+ expected_modification_time));
}
scoped_ptr<FileStreamWriter> IsolatedFileSystemBackend::CreateFileStreamWriter(
@@ -141,4 +143,4 @@ FileSystemQuotaUtil* IsolatedFileSystemBackend::GetQuotaUtil() {
return NULL;
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/isolated_file_system_backend.h b/webkit/browser/fileapi/isolated_file_system_backend.h
index 4d67269..a64b0b7 100644
--- a/webkit/browser/fileapi/isolated_file_system_backend.h
+++ b/webkit/browser/fileapi/isolated_file_system_backend.h
@@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "webkit/browser/fileapi/file_system_backend.h"
-namespace fileapi {
+namespace storage {
class AsyncFileUtilAdapter;
@@ -33,8 +33,8 @@ class IsolatedFileSystemBackend : public FileSystemBackend {
base::File::Error* error_code) const OVERRIDE;
virtual bool SupportsStreaming(const FileSystemURL& url) const OVERRIDE;
virtual bool HasInplaceCopyImplementation(
- fileapi::FileSystemType type) const OVERRIDE;
- virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
+ storage::FileSystemType type) const OVERRIDE;
+ virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
const base::Time& expected_modification_time,
@@ -51,6 +51,6 @@ class IsolatedFileSystemBackend : public FileSystemBackend {
scoped_ptr<AsyncFileUtilAdapter> transient_file_util_;
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_ISOLATED_FILE_SYSTEM_BACKEND_H_
diff --git a/webkit/browser/fileapi/local_file_stream_writer.cc b/webkit/browser/fileapi/local_file_stream_writer.cc
index 508cc50..6f58ffa 100644
--- a/webkit/browser/fileapi/local_file_stream_writer.cc
+++ b/webkit/browser/fileapi/local_file_stream_writer.cc
@@ -10,7 +10,7 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
-namespace fileapi {
+namespace storage {
namespace {
@@ -254,4 +254,4 @@ bool LocalFileStreamWriter::CancelIfRequested() {
return true;
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/local_file_stream_writer.h b/webkit/browser/fileapi/local_file_stream_writer.h
index 47bea5d..dc98824 100644
--- a/webkit/browser/fileapi/local_file_stream_writer.h
+++ b/webkit/browser/fileapi/local_file_stream_writer.h
@@ -25,7 +25,7 @@ namespace net {
class FileStream;
}
-namespace fileapi {
+namespace storage {
// This class is a thin wrapper around net::FileStream for writing local files.
class WEBKIT_STORAGE_BROWSER_EXPORT LocalFileStreamWriter
@@ -95,6 +95,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT LocalFileStreamWriter
DISALLOW_COPY_AND_ASSIGN(LocalFileStreamWriter);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_STREAM_WRITER_H_
diff --git a/webkit/browser/fileapi/local_file_util.cc b/webkit/browser/fileapi/local_file_util.cc
index 3b823aa..fff13b5 100644
--- a/webkit/browser/fileapi/local_file_util.cc
+++ b/webkit/browser/fileapi/local_file_util.cc
@@ -16,7 +16,7 @@
#include "webkit/common/fileapi/file_system_types.h"
#include "webkit/common/fileapi/file_system_util.h"
-namespace fileapi {
+namespace storage {
AsyncFileUtil* AsyncFileUtil::CreateForLocalFileSystem() {
return new AsyncFileUtilAdapter(new LocalFileUtil());
@@ -202,8 +202,10 @@ base::File::Error LocalFileUtil::CopyOrMoveFile(
return error;
return NativeFileUtil::CopyOrMoveFile(
- src_file_path, dest_file_path, option,
- fileapi::NativeFileUtil::CopyOrMoveModeForDestination(dest_url, copy));
+ src_file_path,
+ dest_file_path,
+ option,
+ storage::NativeFileUtil::CopyOrMoveModeForDestination(dest_url, copy));
}
base::File::Error LocalFileUtil::CopyInForeignFile(
@@ -219,8 +221,10 @@ base::File::Error LocalFileUtil::CopyInForeignFile(
if (error != base::File::FILE_OK)
return error;
return NativeFileUtil::CopyOrMoveFile(
- src_file_path, dest_file_path, FileSystemOperation::OPTION_NONE,
- fileapi::NativeFileUtil::CopyOrMoveModeForDestination(dest_url,
+ src_file_path,
+ dest_file_path,
+ FileSystemOperation::OPTION_NONE,
+ storage::NativeFileUtil::CopyOrMoveModeForDestination(dest_url,
true /* copy */));
}
@@ -244,7 +248,7 @@ base::File::Error LocalFileUtil::DeleteDirectory(
return NativeFileUtil::DeleteDirectory(file_path);
}
-webkit_blob::ScopedFile LocalFileUtil::CreateSnapshotFile(
+storage::ScopedFile LocalFileUtil::CreateSnapshotFile(
FileSystemOperationContext* context,
const FileSystemURL& url,
base::File::Error* error,
@@ -255,7 +259,7 @@ webkit_blob::ScopedFile LocalFileUtil::CreateSnapshotFile(
*error = GetFileInfo(context, url, file_info, platform_path);
if (*error == base::File::FILE_OK && file_info->is_directory)
*error = base::File::FILE_ERROR_NOT_A_FILE;
- return webkit_blob::ScopedFile();
+ return storage::ScopedFile();
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/local_file_util.h b/webkit/browser/fileapi/local_file_util.h
index 18199ad..b22d225 100644
--- a/webkit/browser/fileapi/local_file_util.h
+++ b/webkit/browser/fileapi/local_file_util.h
@@ -17,7 +17,7 @@ class Time;
class GURL;
-namespace fileapi {
+namespace storage {
class FileSystemOperationContext;
class FileSystemURL;
@@ -78,7 +78,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT LocalFileUtil
virtual base::File::Error DeleteDirectory(
FileSystemOperationContext* context,
const FileSystemURL& url) OVERRIDE;
- virtual webkit_blob::ScopedFile CreateSnapshotFile(
+ virtual storage::ScopedFile CreateSnapshotFile(
FileSystemOperationContext* context,
const FileSystemURL& url,
base::File::Error* error,
@@ -89,6 +89,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT LocalFileUtil
DISALLOW_COPY_AND_ASSIGN(LocalFileUtil);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_
diff --git a/webkit/browser/fileapi/mount_points.cc b/webkit/browser/fileapi/mount_points.cc
index cd7c7b2..9523071 100644
--- a/webkit/browser/fileapi/mount_points.cc
+++ b/webkit/browser/fileapi/mount_points.cc
@@ -4,12 +4,11 @@
#include "webkit/browser/fileapi/mount_points.h"
-namespace fileapi {
+namespace storage {
MountPoints::MountPointInfo::MountPointInfo() {}
MountPoints::MountPointInfo::MountPointInfo(
const std::string& name, const base::FilePath& path)
: name(name), path(path) {}
-} // namespace fileapi
-
+} // namespace storage
diff --git a/webkit/browser/fileapi/mount_points.h b/webkit/browser/fileapi/mount_points.h
index d206ab9..6548998 100644
--- a/webkit/browser/fileapi/mount_points.h
+++ b/webkit/browser/fileapi/mount_points.h
@@ -15,12 +15,12 @@
class GURL;
-namespace fileapi {
+namespace storage {
class FileSystemMountOption;
class FileSystemURL;
}
-namespace fileapi {
+namespace storage {
// Represents a set of mount points for File API.
class WEBKIT_STORAGE_BROWSER_EXPORT MountPoints {
@@ -65,7 +65,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT MountPoints {
// registered in this context, returns empty, invalid FileSystemURL.
virtual FileSystemURL CreateCrackedFileSystemURL(
const GURL& origin,
- fileapi::FileSystemType type,
+ storage::FileSystemType type,
const base::FilePath& path) const = 0;
// Returns the mount point root path registered for a given |mount_name|.
@@ -103,6 +103,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT MountPoints {
DISALLOW_COPY_AND_ASSIGN(MountPoints);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_MOUNT_POINTS_H_
diff --git a/webkit/browser/fileapi/native_file_util.cc b/webkit/browser/fileapi/native_file_util.cc
index c022994..2fa3ef9 100644
--- a/webkit/browser/fileapi/native_file_util.cc
+++ b/webkit/browser/fileapi/native_file_util.cc
@@ -11,7 +11,7 @@
#include "webkit/browser/fileapi/file_system_operation_context.h"
#include "webkit/browser/fileapi/file_system_url.h"
-namespace fileapi {
+namespace storage {
namespace {
@@ -312,4 +312,4 @@ base::File::Error NativeFileUtil::DeleteDirectory(const base::FilePath& path) {
return base::File::FILE_OK;
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/native_file_util.h b/webkit/browser/fileapi/native_file_util.h
index bd87581..7edb21e 100644
--- a/webkit/browser/fileapi/native_file_util.h
+++ b/webkit/browser/fileapi/native_file_util.h
@@ -16,7 +16,7 @@ namespace base {
class Time;
}
-namespace fileapi {
+namespace storage {
// A thin wrapper class for accessing the OS native filesystem.
// This performs common error checks necessary to implement FileUtil family
@@ -68,6 +68,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE NativeFileUtil {
DISALLOW_IMPLICIT_CONSTRUCTORS(NativeFileUtil);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_NATIVE_FILE_UTIL_H_
diff --git a/webkit/browser/fileapi/obfuscated_file_util.cc b/webkit/browser/fileapi/obfuscated_file_util.cc
index 73722d4..da58125 100644
--- a/webkit/browser/fileapi/obfuscated_file_util.cc
+++ b/webkit/browser/fileapi/obfuscated_file_util.cc
@@ -43,7 +43,7 @@
// file_util::DoAnother(local_path);
// }
-namespace fileapi {
+namespace storage {
namespace {
@@ -73,7 +73,7 @@ int64 UsageForPath(size_t length) {
}
bool AllocateQuota(FileSystemOperationContext* context, int64 growth) {
- if (context->allowed_bytes_growth() == quota::QuotaManager::kNoLimit)
+ if (context->allowed_bytes_growth() == storage::QuotaManager::kNoLimit)
return true;
int64 new_quota = context->allowed_bytes_growth() - growth;
@@ -227,7 +227,7 @@ class ObfuscatedOriginEnumerator
origins_.pop_back();
}
current_ = record;
- return webkit_database::GetOriginFromIdentifier(record.origin);
+ return storage::GetOriginFromIdentifier(record.origin);
}
// Returns the current origin's information.
@@ -250,7 +250,7 @@ class ObfuscatedOriginEnumerator
};
ObfuscatedFileUtil::ObfuscatedFileUtil(
- quota::SpecialStoragePolicy* special_storage_policy,
+ storage::SpecialStoragePolicy* special_storage_policy,
const base::FilePath& file_system_directory,
leveldb::Env* env_override,
base::SequencedTaskRunner* file_task_runner,
@@ -276,7 +276,7 @@ base::File ObfuscatedFileUtil::CreateOrOpen(
const FileSystemURL& url, int file_flags) {
base::File file = CreateOrOpenInternal(context, url, file_flags);
if (file.IsValid() && file_flags & base::File::FLAG_WRITE &&
- context->quota_limit_type() == quota::kQuotaLimitTypeUnlimited &&
+ context->quota_limit_type() == storage::kQuotaLimitTypeUnlimited &&
sandbox_delegate_) {
sandbox_delegate_->StickyInvalidateUsageCache(url.origin(), url.type());
}
@@ -579,7 +579,7 @@ base::File::Error ObfuscatedFileUtil::CopyOrMoveFile(
src_local_path,
dest_local_path,
option,
- fileapi::NativeFileUtil::CopyOrMoveModeForDestination(
+ storage::NativeFileUtil::CopyOrMoveModeForDestination(
dest_url, true /* copy */));
} else { // non-overwrite
error = CreateFile(context, src_local_path, dest_url, &dest_file_info);
@@ -682,9 +682,10 @@ base::File::Error ObfuscatedFileUtil::CopyInForeignFile(
base::FilePath dest_local_path =
DataPathToLocalPath(dest_url, dest_file_info.data_path);
error = NativeFileUtil::CopyOrMoveFile(
- src_file_path, dest_local_path,
+ src_file_path,
+ dest_local_path,
FileSystemOperation::OPTION_NONE,
- fileapi::NativeFileUtil::CopyOrMoveModeForDestination(dest_url,
+ storage::NativeFileUtil::CopyOrMoveModeForDestination(dest_url,
true /* copy */));
} else {
error = CreateFile(context, src_file_path, dest_url, &dest_file_info);
@@ -777,7 +778,7 @@ base::File::Error ObfuscatedFileUtil::DeleteDirectory(
return base::File::FILE_OK;
}
-webkit_blob::ScopedFile ObfuscatedFileUtil::CreateSnapshotFile(
+storage::ScopedFile ObfuscatedFileUtil::CreateSnapshotFile(
FileSystemOperationContext* context,
const FileSystemURL& url,
base::File::Error* error,
@@ -789,7 +790,7 @@ webkit_blob::ScopedFile ObfuscatedFileUtil::CreateSnapshotFile(
*file_info = base::File::Info();
*error = base::File::FILE_ERROR_NOT_A_FILE;
}
- return webkit_blob::ScopedFile();
+ return storage::ScopedFile();
}
scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator>
@@ -897,7 +898,7 @@ bool ObfuscatedFileUtil::DeleteDirectoryForOriginAndType(
InitOriginDatabase(origin, false);
if (origin_database_) {
origin_database_->RemovePathForOrigin(
- webkit_database::GetIdentifierFromOrigin(origin));
+ storage::GetIdentifierFromOrigin(origin));
}
if (!base::DeleteFile(origin_path, true /* recursive */))
return false;
@@ -947,7 +948,7 @@ void ObfuscatedFileUtil::MaybePrepopulateDatabase(
std::string origin_string = database.GetPrimaryOrigin();
if (origin_string.empty() || !database.HasOriginPath(origin_string))
return;
- const GURL origin = webkit_database::GetOriginFromIdentifier(origin_string);
+ const GURL origin = storage::GetOriginFromIdentifier(origin_string);
// Prepopulate the directory database(s) if and only if this instance
// has primary origin and the directory database is already there.
@@ -1099,9 +1100,10 @@ base::File::Error ObfuscatedFileUtil::CreateFile(
error = NativeFileUtil::EnsureFileExists(dest_local_path, &created);
} else {
error = NativeFileUtil::CopyOrMoveFile(
- src_file_path, dest_local_path,
+ src_file_path,
+ dest_local_path,
FileSystemOperation::OPTION_NONE,
- fileapi::NativeFileUtil::CopyOrMoveModeForDestination(dest_url,
+ storage::NativeFileUtil::CopyOrMoveModeForDestination(dest_url,
true /* copy */));
created = true;
}
@@ -1148,8 +1150,7 @@ std::string ObfuscatedFileUtil::GetDirectoryDatabaseKey(
return std::string();
}
// For isolated origin we just use a type string as a key.
- return webkit_database::GetIdentifierFromOrigin(origin) +
- type_string;
+ return storage::GetIdentifierFromOrigin(origin) + type_string;
}
// TODO(ericu): How to do the whole validation-without-creation thing?
@@ -1194,7 +1195,7 @@ base::FilePath ObfuscatedFileUtil::GetDirectoryForOrigin(
return base::FilePath();
}
base::FilePath directory_name;
- std::string id = webkit_database::GetIdentifierFromOrigin(origin);
+ std::string id = storage::GetIdentifierFromOrigin(origin);
bool exists_in_db = origin_database_->HasOriginPath(id);
if (!exists_in_db && !create) {
@@ -1287,7 +1288,7 @@ bool ObfuscatedFileUtil::InitOriginDatabase(const GURL& origin_hint,
return true;
const std::string isolated_origin_string =
- webkit_database::GetIdentifierFromOrigin(origin_hint);
+ storage::GetIdentifierFromOrigin(origin_hint);
// TODO(kinuko): Deprecate this after a few release cycles, e.g. around M33.
base::FilePath isolated_origin_dir = file_system_directory_.Append(
@@ -1420,4 +1421,4 @@ bool ObfuscatedFileUtil::HasIsolatedStorage(const GURL& origin) {
special_storage_policy_->HasIsolatedStorage(origin);
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/obfuscated_file_util.h b/webkit/browser/fileapi/obfuscated_file_util.h
index ada4e6f..1b2b58b 100644
--- a/webkit/browser/fileapi/obfuscated_file_util.h
+++ b/webkit/browser/fileapi/obfuscated_file_util.h
@@ -34,13 +34,13 @@ class ObfuscatedFileUtilTest;
class QuotaBackendImplTest;
}
-namespace quota {
+namespace storage {
class SpecialStoragePolicy;
}
class GURL;
-namespace fileapi {
+namespace storage {
class FileSystemOperationContext;
class SandboxOriginDatabaseInterface;
@@ -101,14 +101,13 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE ObfuscatedFileUtil
// for any known type exists the origin directory may get deleted when
// one origin/type pair is deleted.
//
- ObfuscatedFileUtil(
- quota::SpecialStoragePolicy* special_storage_policy,
- const base::FilePath& file_system_directory,
- leveldb::Env* env_override,
- base::SequencedTaskRunner* file_task_runner,
- const GetTypeStringForURLCallback& get_type_string_for_url,
- const std::set<std::string>& known_type_strings,
- SandboxFileSystemBackendDelegate* sandbox_delegate);
+ ObfuscatedFileUtil(storage::SpecialStoragePolicy* special_storage_policy,
+ const base::FilePath& file_system_directory,
+ leveldb::Env* env_override,
+ base::SequencedTaskRunner* file_task_runner,
+ const GetTypeStringForURLCallback& get_type_string_for_url,
+ const std::set<std::string>& known_type_strings,
+ SandboxFileSystemBackendDelegate* sandbox_delegate);
virtual ~ObfuscatedFileUtil();
// FileSystemFileUtil overrides.
@@ -161,7 +160,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE ObfuscatedFileUtil
virtual base::File::Error DeleteDirectory(
FileSystemOperationContext* context,
const FileSystemURL& url) OVERRIDE;
- virtual webkit_blob::ScopedFile CreateSnapshotFile(
+ virtual storage::ScopedFile CreateSnapshotFile(
FileSystemOperationContext* context,
const FileSystemURL& url,
base::File::Error* error,
@@ -237,7 +236,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE ObfuscatedFileUtil
// (temporary, persistent) file systems. Used only for testing.
// Note: this is implemented in sandbox_file_system_backend_delegate.cc.
static ObfuscatedFileUtil* CreateForTesting(
- quota::SpecialStoragePolicy* special_storage_policy,
+ storage::SpecialStoragePolicy* special_storage_policy,
const base::FilePath& file_system_directory,
leveldb::Env* env_override,
base::SequencedTaskRunner* file_task_runner);
@@ -336,7 +335,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE ObfuscatedFileUtil
typedef std::map<std::string, SandboxDirectoryDatabase*> DirectoryMap;
DirectoryMap directories_;
scoped_ptr<SandboxOriginDatabaseInterface> origin_database_;
- scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
+ scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_;
base::FilePath file_system_directory_;
leveldb::Env* env_override_;
@@ -355,6 +354,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE ObfuscatedFileUtil
DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_
diff --git a/webkit/browser/fileapi/open_file_system_mode.h b/webkit/browser/fileapi/open_file_system_mode.h
index 72a2bcb..3bc352f 100644
--- a/webkit/browser/fileapi/open_file_system_mode.h
+++ b/webkit/browser/fileapi/open_file_system_mode.h
@@ -5,7 +5,7 @@
#ifndef WEBKIT_BROWSER_FILEAPI_OPEN_FILE_SYSTEM_MODE_H_
#define WEBKIT_BROWSER_FILEAPI_OPEN_FILE_SYSTEM_MODE_H_
-namespace fileapi {
+namespace storage {
// Determines the behavior on OpenFileSystem when a specified
// FileSystem does not exist.
@@ -17,6 +17,6 @@ enum OpenFileSystemMode {
OPEN_FILE_SYSTEM_FAIL_IF_NONEXISTENT,
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_OPEN_FILE_SYSTEM_MODE_H_
diff --git a/webkit/browser/fileapi/plugin_private_file_system_backend.cc b/webkit/browser/fileapi/plugin_private_file_system_backend.cc
index ce5e614..7beb1b7 100644
--- a/webkit/browser/fileapi/plugin_private_file_system_backend.cc
+++ b/webkit/browser/fileapi/plugin_private_file_system_backend.cc
@@ -22,7 +22,7 @@
#include "webkit/browser/fileapi/quota/quota_reservation.h"
#include "webkit/common/fileapi/file_system_util.h"
-namespace fileapi {
+namespace storage {
class PluginPrivateFileSystemBackend::FileSystemIDToPluginMap {
public:
@@ -87,12 +87,12 @@ base::File::Error OpenFileSystemOnFileTaskRunner(
PluginPrivateFileSystemBackend::PluginPrivateFileSystemBackend(
base::SequencedTaskRunner* file_task_runner,
const base::FilePath& profile_path,
- quota::SpecialStoragePolicy* special_storage_policy,
+ storage::SpecialStoragePolicy* special_storage_policy,
const FileSystemOptions& file_system_options)
: file_task_runner_(file_task_runner),
file_system_options_(file_system_options),
- base_path_(profile_path.Append(
- kFileSystemDirectory).Append(kPluginPrivateDirectory)),
+ base_path_(profile_path.Append(kFileSystemDirectory)
+ .Append(kPluginPrivateDirectory)),
plugin_map_(new FileSystemIDToPluginMap(file_task_runner)),
weak_factory_(this) {
file_util_.reset(
@@ -179,22 +179,22 @@ FileSystemOperation* PluginPrivateFileSystemBackend::CreateFileSystemOperation(
}
bool PluginPrivateFileSystemBackend::SupportsStreaming(
- const fileapi::FileSystemURL& url) const {
+ const storage::FileSystemURL& url) const {
return false;
}
bool PluginPrivateFileSystemBackend::HasInplaceCopyImplementation(
- fileapi::FileSystemType type) const {
+ storage::FileSystemType type) const {
return false;
}
-scoped_ptr<webkit_blob::FileStreamReader>
+scoped_ptr<storage::FileStreamReader>
PluginPrivateFileSystemBackend::CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
const base::Time& expected_modification_time,
FileSystemContext* context) const {
- return scoped_ptr<webkit_blob::FileStreamReader>();
+ return scoped_ptr<storage::FileStreamReader>();
}
scoped_ptr<FileStreamWriter>
@@ -212,7 +212,7 @@ FileSystemQuotaUtil* PluginPrivateFileSystemBackend::GetQuotaUtil() {
base::File::Error
PluginPrivateFileSystemBackend::DeleteOriginDataOnFileTaskRunner(
FileSystemContext* context,
- quota::QuotaManagerProxy* proxy,
+ storage::QuotaManagerProxy* proxy,
const GURL& origin_url,
FileSystemType type) {
if (!CanHandleType(type))
@@ -303,4 +303,4 @@ ObfuscatedFileUtil* PluginPrivateFileSystemBackend::obfuscated_file_util() {
static_cast<AsyncFileUtilAdapter*>(file_util_.get())->sync_file_util());
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/plugin_private_file_system_backend.h b/webkit/browser/fileapi/plugin_private_file_system_backend.h
index 73f8731..1288928 100644
--- a/webkit/browser/fileapi/plugin_private_file_system_backend.h
+++ b/webkit/browser/fileapi/plugin_private_file_system_backend.h
@@ -22,11 +22,11 @@ namespace content {
class PluginPrivateFileSystemBackendTest;
}
-namespace quota {
+namespace storage {
class SpecialStoragePolicy;
}
-namespace fileapi {
+namespace storage {
class ObfuscatedFileUtil;
@@ -40,7 +40,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT PluginPrivateFileSystemBackend
PluginPrivateFileSystemBackend(
base::SequencedTaskRunner* file_task_runner,
const base::FilePath& profile_path,
- quota::SpecialStoragePolicy* special_storage_policy,
+ storage::SpecialStoragePolicy* special_storage_policy,
const FileSystemOptions& file_system_options);
virtual ~PluginPrivateFileSystemBackend();
@@ -74,8 +74,8 @@ class WEBKIT_STORAGE_BROWSER_EXPORT PluginPrivateFileSystemBackend
base::File::Error* error_code) const OVERRIDE;
virtual bool SupportsStreaming(const FileSystemURL& url) const OVERRIDE;
virtual bool HasInplaceCopyImplementation(
- fileapi::FileSystemType type) const OVERRIDE;
- virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
+ storage::FileSystemType type) const OVERRIDE;
+ virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
const base::Time& expected_modification_time,
@@ -89,7 +89,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT PluginPrivateFileSystemBackend
// FileSystemQuotaUtil overrides.
virtual base::File::Error DeleteOriginDataOnFileTaskRunner(
FileSystemContext* context,
- quota::QuotaManagerProxy* proxy,
+ storage::QuotaManagerProxy* proxy,
const GURL& origin_url,
FileSystemType type) OVERRIDE;
virtual void GetOriginsForTypeOnFileTaskRunner(
@@ -142,6 +142,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT PluginPrivateFileSystemBackend
DISALLOW_COPY_AND_ASSIGN(PluginPrivateFileSystemBackend);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_
diff --git a/webkit/browser/fileapi/quota/open_file_handle.cc b/webkit/browser/fileapi/quota/open_file_handle.cc
index 27f50b1..b8c0b29 100644
--- a/webkit/browser/fileapi/quota/open_file_handle.cc
+++ b/webkit/browser/fileapi/quota/open_file_handle.cc
@@ -7,7 +7,7 @@
#include "webkit/browser/fileapi/quota/open_file_handle_context.h"
#include "webkit/browser/fileapi/quota/quota_reservation.h"
-namespace fileapi {
+namespace storage {
OpenFileHandle::~OpenFileHandle() {
DCHECK(sequence_checker_.CalledOnValidSequencedThread());
@@ -52,4 +52,4 @@ OpenFileHandle::OpenFileHandle(QuotaReservation* reservation,
DCHECK(sequence_checker_.CalledOnValidSequencedThread());
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/quota/open_file_handle.h b/webkit/browser/fileapi/quota/open_file_handle.h
index 2bd7e93..1f25b96 100644
--- a/webkit/browser/fileapi/quota/open_file_handle.h
+++ b/webkit/browser/fileapi/quota/open_file_handle.h
@@ -14,7 +14,7 @@ namespace base {
class FilePath;
}
-namespace fileapi {
+namespace storage {
class QuotaReservation;
class OpenFileHandleContext;
@@ -65,6 +65,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT OpenFileHandle {
DISALLOW_COPY_AND_ASSIGN(OpenFileHandle);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_QUOTA_OPEN_FILE_HANDLE_H_
diff --git a/webkit/browser/fileapi/quota/open_file_handle_context.cc b/webkit/browser/fileapi/quota/open_file_handle_context.cc
index 57e284f..33f5bab 100644
--- a/webkit/browser/fileapi/quota/open_file_handle_context.cc
+++ b/webkit/browser/fileapi/quota/open_file_handle_context.cc
@@ -7,7 +7,7 @@
#include "base/file_util.h"
#include "webkit/browser/fileapi/quota/quota_reservation_buffer.h"
-namespace fileapi {
+namespace storage {
OpenFileHandleContext::OpenFileHandleContext(
const base::FilePath& platform_path,
@@ -69,4 +69,4 @@ OpenFileHandleContext::~OpenFileHandleContext() {
reservation_buffer_->DetachOpenFileHandleContext(this);
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/quota/open_file_handle_context.h b/webkit/browser/fileapi/quota/open_file_handle_context.h
index 5b0cbcb9c..b93bf14 100644
--- a/webkit/browser/fileapi/quota/open_file_handle_context.h
+++ b/webkit/browser/fileapi/quota/open_file_handle_context.h
@@ -15,7 +15,7 @@
#include "webkit/browser/webkit_storage_browser_export.h"
#include "webkit/common/fileapi/file_system_types.h"
-namespace fileapi {
+namespace storage {
class QuotaReservationBuffer;
@@ -56,6 +56,6 @@ class OpenFileHandleContext : public base::RefCounted<OpenFileHandleContext> {
DISALLOW_COPY_AND_ASSIGN(OpenFileHandleContext);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_OPEN_FILE_HANDLE_CONTEXT_H_
diff --git a/webkit/browser/fileapi/quota/quota_backend_impl.cc b/webkit/browser/fileapi/quota/quota_backend_impl.cc
index de0b3ac..fe2e11d 100644
--- a/webkit/browser/fileapi/quota/quota_backend_impl.cc
+++ b/webkit/browser/fileapi/quota/quota_backend_impl.cc
@@ -16,13 +16,13 @@
#include "webkit/browser/quota/quota_manager_proxy.h"
#include "webkit/common/fileapi/file_system_util.h"
-namespace fileapi {
+namespace storage {
QuotaBackendImpl::QuotaBackendImpl(
base::SequencedTaskRunner* file_task_runner,
ObfuscatedFileUtil* obfuscated_file_util,
FileSystemUsageCache* file_system_usage_cache,
- quota::QuotaManagerProxy* quota_manager_proxy)
+ storage::QuotaManagerProxy* quota_manager_proxy)
: file_task_runner_(file_task_runner),
obfuscated_file_util_(obfuscated_file_util),
file_system_usage_cache_(file_system_usage_cache),
@@ -102,12 +102,14 @@ void QuotaBackendImpl::DecrementDirtyCount(const GURL& origin,
void QuotaBackendImpl::DidGetUsageAndQuotaForReserveQuota(
const QuotaReservationInfo& info,
const ReserveQuotaCallback& callback,
- quota::QuotaStatusCode status, int64 usage, int64 quota) {
+ storage::QuotaStatusCode status,
+ int64 usage,
+ int64 quota) {
DCHECK(file_task_runner_->RunsTasksOnCurrentThread());
DCHECK(info.origin.is_valid());
DCHECK_LE(0, usage);
DCHECK_LE(0, quota);
- if (status != quota::kQuotaStatusOk) {
+ if (status != storage::kQuotaStatusOk) {
callback.Run(base::File::FILE_ERROR_FAILED, 0);
return;
}
@@ -136,8 +138,10 @@ void QuotaBackendImpl::ReserveQuotaInternal(const QuotaReservationInfo& info) {
DCHECK(info.origin.is_valid());
DCHECK(quota_manager_proxy_);
quota_manager_proxy_->NotifyStorageModified(
- quota::QuotaClient::kFileSystem, info.origin,
- FileSystemTypeToQuotaStorageType(info.type), info.delta);
+ storage::QuotaClient::kFileSystem,
+ info.origin,
+ FileSystemTypeToQuotaStorageType(info.type),
+ info.delta);
}
base::File::Error QuotaBackendImpl::GetUsageCachePath(
@@ -162,4 +166,4 @@ QuotaBackendImpl::QuotaReservationInfo::QuotaReservationInfo(
QuotaBackendImpl::QuotaReservationInfo::~QuotaReservationInfo() {
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/quota/quota_backend_impl.h b/webkit/browser/fileapi/quota/quota_backend_impl.h
index ec4c45a..98c36a0 100644
--- a/webkit/browser/fileapi/quota/quota_backend_impl.h
+++ b/webkit/browser/fileapi/quota/quota_backend_impl.h
@@ -20,11 +20,11 @@ namespace content {
class QuotaBackendImplTest;
}
-namespace quota {
+namespace storage {
class QuotaManagerProxy;
}
-namespace fileapi {
+namespace storage {
class FileSystemUsageCache;
class ObfuscatedFileUtil;
@@ -39,7 +39,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT QuotaBackendImpl
QuotaBackendImpl(base::SequencedTaskRunner* file_task_runner,
ObfuscatedFileUtil* obfuscated_file_util,
FileSystemUsageCache* file_system_usage_cache,
- quota::QuotaManagerProxy* quota_manager_proxy);
+ storage::QuotaManagerProxy* quota_manager_proxy);
virtual ~QuotaBackendImpl();
// QuotaReservationManager::QuotaBackend overrides.
@@ -75,12 +75,11 @@ class WEBKIT_STORAGE_BROWSER_EXPORT QuotaBackendImpl
int64 delta;
};
- void DidGetUsageAndQuotaForReserveQuota(
- const QuotaReservationInfo& info,
- const ReserveQuotaCallback& callback,
- quota::QuotaStatusCode status,
- int64 usage,
- int64 quota);
+ void DidGetUsageAndQuotaForReserveQuota(const QuotaReservationInfo& info,
+ const ReserveQuotaCallback& callback,
+ storage::QuotaStatusCode status,
+ int64 usage,
+ int64 quota);
void ReserveQuotaInternal(
const QuotaReservationInfo& info);
@@ -95,13 +94,13 @@ class WEBKIT_STORAGE_BROWSER_EXPORT QuotaBackendImpl
ObfuscatedFileUtil* obfuscated_file_util_;
FileSystemUsageCache* file_system_usage_cache_;
- scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_;
+ scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy_;
base::WeakPtrFactory<QuotaBackendImpl> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(QuotaBackendImpl);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_BACKEND_IMPL_H_
diff --git a/webkit/browser/fileapi/quota/quota_reservation.cc b/webkit/browser/fileapi/quota/quota_reservation.cc
index f199b35..5139d0b 100644
--- a/webkit/browser/fileapi/quota/quota_reservation.cc
+++ b/webkit/browser/fileapi/quota/quota_reservation.cc
@@ -8,7 +8,7 @@
#include "webkit/browser/fileapi/quota/open_file_handle.h"
#include "webkit/browser/fileapi/quota/quota_reservation_buffer.h"
-namespace fileapi {
+namespace storage {
void QuotaReservation::RefreshReservation(
int64 size,
@@ -124,4 +124,4 @@ bool QuotaReservation::DidUpdateReservedQuota(
return true;
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/quota/quota_reservation.h b/webkit/browser/fileapi/quota/quota_reservation.h
index 9233a24..be107d6 100644
--- a/webkit/browser/fileapi/quota/quota_reservation.h
+++ b/webkit/browser/fileapi/quota/quota_reservation.h
@@ -16,7 +16,7 @@
class GURL;
-namespace fileapi {
+namespace storage {
class QuotaReservationBuffer;
class OpenFileHandle;
@@ -90,6 +90,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT QuotaReservation
DISALLOW_COPY_AND_ASSIGN(QuotaReservation);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_H_
diff --git a/webkit/browser/fileapi/quota/quota_reservation_buffer.cc b/webkit/browser/fileapi/quota/quota_reservation_buffer.cc
index 9e44319..cfa567f 100644
--- a/webkit/browser/fileapi/quota/quota_reservation_buffer.cc
+++ b/webkit/browser/fileapi/quota/quota_reservation_buffer.cc
@@ -9,7 +9,7 @@
#include "webkit/browser/fileapi/quota/open_file_handle_context.h"
#include "webkit/browser/fileapi/quota/quota_reservation.h"
-namespace fileapi {
+namespace storage {
QuotaReservationBuffer::QuotaReservationBuffer(
base::WeakPtr<QuotaReservationManager> reservation_manager,
@@ -102,5 +102,4 @@ bool QuotaReservationBuffer::DecrementDirtyCount(
return false;
}
-
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/quota/quota_reservation_buffer.h b/webkit/browser/fileapi/quota/quota_reservation_buffer.h
index 0d87a99..967e1b9 100644
--- a/webkit/browser/fileapi/quota/quota_reservation_buffer.h
+++ b/webkit/browser/fileapi/quota/quota_reservation_buffer.h
@@ -16,7 +16,7 @@
#include "webkit/browser/webkit_storage_browser_export.h"
#include "webkit/common/fileapi/file_system_types.h"
-namespace fileapi {
+namespace storage {
class QuotaReservation;
class OpenFileHandle;
@@ -73,7 +73,7 @@ class QuotaReservationBuffer : public base::RefCounted<QuotaReservationBuffer> {
base::WeakPtr<QuotaReservationManager> reservation_manager_;
GURL origin_;
- fileapi::FileSystemType type_;
+ storage::FileSystemType type_;
int64 reserved_quota_;
@@ -82,6 +82,6 @@ class QuotaReservationBuffer : public base::RefCounted<QuotaReservationBuffer> {
DISALLOW_COPY_AND_ASSIGN(QuotaReservationBuffer);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_
diff --git a/webkit/browser/fileapi/quota/quota_reservation_manager.cc b/webkit/browser/fileapi/quota/quota_reservation_manager.cc
index efb54b2..6ab2c26 100644
--- a/webkit/browser/fileapi/quota/quota_reservation_manager.cc
+++ b/webkit/browser/fileapi/quota/quota_reservation_manager.cc
@@ -7,7 +7,7 @@
#include "webkit/browser/fileapi/quota/quota_reservation.h"
#include "webkit/browser/fileapi/quota/quota_reservation_buffer.h"
-namespace fileapi {
+namespace storage {
QuotaReservationManager::QuotaReservationManager(
scoped_ptr<QuotaBackend> backend)
@@ -88,4 +88,4 @@ scoped_refptr<QuotaReservation> QuotaReservationManager::CreateReservation(
return GetReservationBuffer(origin, type)->CreateReservation();;
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/quota/quota_reservation_manager.h b/webkit/browser/fileapi/quota/quota_reservation_manager.h
index 6dc66ec..2e19450 100644
--- a/webkit/browser/fileapi/quota/quota_reservation_manager.h
+++ b/webkit/browser/fileapi/quota/quota_reservation_manager.h
@@ -21,7 +21,7 @@ namespace content {
class QuotaReservationManagerTest;
}
-namespace fileapi {
+namespace storage {
class QuotaReservation;
class QuotaReservationBuffer;
@@ -122,6 +122,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT QuotaReservationManager {
DISALLOW_COPY_AND_ASSIGN(QuotaReservationManager);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_
diff --git a/webkit/browser/fileapi/recursive_operation_delegate.cc b/webkit/browser/fileapi/recursive_operation_delegate.cc
index d1d85e0..7836b32 100644
--- a/webkit/browser/fileapi/recursive_operation_delegate.cc
+++ b/webkit/browser/fileapi/recursive_operation_delegate.cc
@@ -8,7 +8,7 @@
#include "webkit/browser/fileapi/file_system_context.h"
#include "webkit/browser/fileapi/file_system_operation_runner.h"
-namespace fileapi {
+namespace storage {
namespace {
// Don't start too many inflight operations.
@@ -236,4 +236,4 @@ void RecursiveOperationDelegate::Done(base::File::Error error) {
}
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/recursive_operation_delegate.h b/webkit/browser/fileapi/recursive_operation_delegate.h
index 11f8da0..28d5b5e 100644
--- a/webkit/browser/fileapi/recursive_operation_delegate.h
+++ b/webkit/browser/fileapi/recursive_operation_delegate.h
@@ -14,7 +14,7 @@
#include "webkit/browser/fileapi/file_system_operation.h"
#include "webkit/browser/fileapi/file_system_url.h"
-namespace fileapi {
+namespace storage {
class FileSystemContext;
class FileSystemOperationRunner;
@@ -147,6 +147,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT RecursiveOperationDelegate
DISALLOW_COPY_AND_ASSIGN(RecursiveOperationDelegate);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_RECURSIVE_OPERATION_DELEGATE_H_
diff --git a/webkit/browser/fileapi/remove_operation_delegate.cc b/webkit/browser/fileapi/remove_operation_delegate.cc
index 6c7b2de..8e645cd 100644
--- a/webkit/browser/fileapi/remove_operation_delegate.cc
+++ b/webkit/browser/fileapi/remove_operation_delegate.cc
@@ -8,7 +8,7 @@
#include "webkit/browser/fileapi/file_system_context.h"
#include "webkit/browser/fileapi/file_system_operation_runner.h"
-namespace fileapi {
+namespace storage {
RemoveOperationDelegate::RemoveOperationDelegate(
FileSystemContext* file_system_context,
@@ -79,4 +79,4 @@ void RemoveOperationDelegate::DidRemoveFile(const StatusCallback& callback,
callback.Run(error);
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/remove_operation_delegate.h b/webkit/browser/fileapi/remove_operation_delegate.h
index ee0252a..57380a3 100644
--- a/webkit/browser/fileapi/remove_operation_delegate.h
+++ b/webkit/browser/fileapi/remove_operation_delegate.h
@@ -9,7 +9,7 @@
#include "webkit/browser/fileapi/recursive_operation_delegate.h"
-namespace fileapi {
+namespace storage {
class RemoveOperationDelegate : public RecursiveOperationDelegate {
public:
@@ -41,6 +41,6 @@ class RemoveOperationDelegate : public RecursiveOperationDelegate {
DISALLOW_COPY_AND_ASSIGN(RemoveOperationDelegate);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_REMOVE_OPERATION_DELEGATE_H_
diff --git a/webkit/browser/fileapi/sandbox_directory_database.cc b/webkit/browser/fileapi/sandbox_directory_database.cc
index 75aa691..7183fb8 100644
--- a/webkit/browser/fileapi/sandbox_directory_database.cc
+++ b/webkit/browser/fileapi/sandbox_directory_database.cc
@@ -23,9 +23,8 @@
namespace {
-bool PickleFromFileInfo(
- const fileapi::SandboxDirectoryDatabase::FileInfo& info,
- Pickle* pickle) {
+bool PickleFromFileInfo(const storage::SandboxDirectoryDatabase::FileInfo& info,
+ Pickle* pickle) {
DCHECK(pickle);
std::string data_path;
// Round off here to match the behavior of the filesystem on real files.
@@ -33,8 +32,8 @@ bool PickleFromFileInfo(
base::Time::FromDoubleT(floor(info.modification_time.ToDoubleT()));
std::string name;
- data_path = fileapi::FilePathToString(info.data_path);
- name = fileapi::FilePathToString(base::FilePath(info.name));
+ data_path = storage::FilePathToString(info.data_path);
+ name = storage::FilePathToString(base::FilePath(info.name));
if (pickle->WriteInt64(info.parent_id) &&
pickle->WriteString(data_path) &&
@@ -46,9 +45,8 @@ bool PickleFromFileInfo(
return false;
}
-bool FileInfoFromPickle(
- const Pickle& pickle,
- fileapi::SandboxDirectoryDatabase::FileInfo* info) {
+bool FileInfoFromPickle(const Pickle& pickle,
+ storage::SandboxDirectoryDatabase::FileInfo* info) {
PickleIterator iter(pickle);
std::string data_path;
std::string name;
@@ -58,8 +56,8 @@ bool FileInfoFromPickle(
pickle.ReadString(&iter, &data_path) &&
pickle.ReadString(&iter, &name) &&
pickle.ReadInt64(&iter, &internal_time)) {
- info->data_path = fileapi::StringToFilePath(data_path);
- info->name = fileapi::StringToFilePath(name).value();
+ info->data_path = storage::StringToFilePath(data_path);
+ info->name = storage::StringToFilePath(name).value();
info->modification_time = base::Time::FromInternalValue(internal_time);
return true;
}
@@ -93,16 +91,16 @@ enum RepairResult {
};
std::string GetChildLookupKey(
- fileapi::SandboxDirectoryDatabase::FileId parent_id,
+ storage::SandboxDirectoryDatabase::FileId parent_id,
const base::FilePath::StringType& child_name) {
std::string name;
- name = fileapi::FilePathToString(base::FilePath(child_name));
+ name = storage::FilePathToString(base::FilePath(child_name));
return std::string(kChildLookupPrefix) + base::Int64ToString(parent_id) +
std::string(kChildLookupSeparator) + name;
}
std::string GetChildListingKeyPrefix(
- fileapi::SandboxDirectoryDatabase::FileId parent_id) {
+ storage::SandboxDirectoryDatabase::FileId parent_id) {
return std::string(kChildLookupPrefix) + base::Int64ToString(parent_id) +
std::string(kChildLookupSeparator);
}
@@ -116,7 +114,7 @@ const char* LastIntegerKey() {
}
std::string GetFileLookupKey(
- fileapi::SandboxDirectoryDatabase::FileId file_id) {
+ storage::SandboxDirectoryDatabase::FileId file_id) {
return base::Int64ToString(file_id);
}
@@ -134,10 +132,10 @@ std::string GetFileLookupKey(
// - Directory structure is tree, i.e. connected and acyclic.
class DatabaseCheckHelper {
public:
- typedef fileapi::SandboxDirectoryDatabase::FileId FileId;
- typedef fileapi::SandboxDirectoryDatabase::FileInfo FileInfo;
+ typedef storage::SandboxDirectoryDatabase::FileId FileId;
+ typedef storage::SandboxDirectoryDatabase::FileInfo FileInfo;
- DatabaseCheckHelper(fileapi::SandboxDirectoryDatabase* dir_db,
+ DatabaseCheckHelper(storage::SandboxDirectoryDatabase* dir_db,
leveldb::DB* db,
const base::FilePath& path);
@@ -155,7 +153,7 @@ class DatabaseCheckHelper {
bool ScanDirectory();
bool ScanHierarchy();
- fileapi::SandboxDirectoryDatabase* dir_db_;
+ storage::SandboxDirectoryDatabase* dir_db_;
leveldb::DB* db_;
base::FilePath path_;
@@ -170,14 +168,17 @@ class DatabaseCheckHelper {
};
DatabaseCheckHelper::DatabaseCheckHelper(
- fileapi::SandboxDirectoryDatabase* dir_db,
+ storage::SandboxDirectoryDatabase* dir_db,
leveldb::DB* db,
const base::FilePath& path)
- : dir_db_(dir_db), db_(db), path_(path),
+ : dir_db_(dir_db),
+ db_(db),
+ path_(path),
num_directories_in_db_(0),
num_files_in_db_(0),
num_hierarchy_links_in_db_(0),
- last_file_id_(-1), last_integer_(-1) {
+ last_file_id_(-1),
+ last_integer_(-1) {
DCHECK(dir_db_);
DCHECK(db_);
DCHECK(!path_.empty() && base::DirectoryExists(path_));
@@ -271,8 +272,8 @@ bool DatabaseCheckHelper::ScanDirectory() {
// TODO(kinuko): Scans all local file system entries to verify each of them
// has a database entry.
const base::FilePath kExcludes[] = {
- base::FilePath(kDirectoryDatabaseName),
- base::FilePath(fileapi::FileSystemUsageCache::kUsageFileName),
+ base::FilePath(kDirectoryDatabaseName),
+ base::FilePath(storage::FileSystemUsageCache::kUsageFileName),
};
// Any path in |pending_directories| is relative to |path_|.
@@ -389,8 +390,8 @@ bool VerifyDataPath(const base::FilePath& data_path) {
return false;
// See if it's not pointing to the special system paths.
const base::FilePath kExcludes[] = {
- base::FilePath(kDirectoryDatabaseName),
- base::FilePath(fileapi::FileSystemUsageCache::kUsageFileName),
+ base::FilePath(kDirectoryDatabaseName),
+ base::FilePath(storage::FileSystemUsageCache::kUsageFileName),
};
for (size_t i = 0; i < arraysize(kExcludes); ++i) {
if (data_path == kExcludes[i] || kExcludes[i].IsParent(data_path))
@@ -401,7 +402,7 @@ bool VerifyDataPath(const base::FilePath& data_path) {
} // namespace
-namespace fileapi {
+namespace storage {
SandboxDirectoryDatabase::FileInfo::FileInfo() : parent_id(0) {
}
@@ -935,4 +936,4 @@ void SandboxDirectoryDatabase::HandleError(
db_.reset();
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/sandbox_directory_database.h b/webkit/browser/fileapi/sandbox_directory_database.h
index 114af1b..0fb507b 100644
--- a/webkit/browser/fileapi/sandbox_directory_database.h
+++ b/webkit/browser/fileapi/sandbox_directory_database.h
@@ -29,7 +29,7 @@ class Status;
class WriteBatch;
}
-namespace fileapi {
+namespace storage {
// This class WILL NOT protect you against producing directory loops, giving an
// empty directory a backing data file, giving two files the same backing file,
@@ -130,6 +130,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxDirectoryDatabase {
DISALLOW_COPY_AND_ASSIGN(SandboxDirectoryDatabase);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_
diff --git a/webkit/browser/fileapi/sandbox_file_stream_writer.cc b/webkit/browser/fileapi/sandbox_file_stream_writer.cc
index f5efaa6..8fd39bc 100644
--- a/webkit/browser/fileapi/sandbox_file_stream_writer.cc
+++ b/webkit/browser/fileapi/sandbox_file_stream_writer.cc
@@ -16,7 +16,7 @@
#include "webkit/browser/quota/quota_manager_proxy.h"
#include "webkit/common/fileapi/file_system_util.h"
-namespace fileapi {
+namespace storage {
namespace {
@@ -114,7 +114,7 @@ void SandboxFileStreamWriter::DidCreateSnapshotFile(
base::File::Error file_error,
const base::File::Info& file_info,
const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
+ const scoped_refptr<storage::ShareableFileReference>& file_ref) {
DCHECK(!file_ref.get());
if (CancelIfRequested())
@@ -142,7 +142,7 @@ void SandboxFileStreamWriter::DidCreateSnapshotFile(
initial_offset_,
FileStreamWriter::OPEN_EXISTING_FILE));
- quota::QuotaManagerProxy* quota_manager_proxy =
+ storage::QuotaManagerProxy* quota_manager_proxy =
file_system_context_->quota_manager_proxy();
if (!quota_manager_proxy) {
// If we don't have the quota manager or the requested filesystem type
@@ -162,11 +162,12 @@ void SandboxFileStreamWriter::DidCreateSnapshotFile(
void SandboxFileStreamWriter::DidGetUsageAndQuota(
const net::CompletionCallback& callback,
- quota::QuotaStatusCode status,
- int64 usage, int64 quota) {
+ storage::QuotaStatusCode status,
+ int64 usage,
+ int64 quota) {
if (CancelIfRequested())
return;
- if (status != quota::kQuotaStatusOk) {
+ if (status != storage::kQuotaStatusOk) {
LOG(WARNING) << "Got unexpected quota error : " << status;
callback.Run(net::ERR_FAILED);
return;
@@ -243,4 +244,4 @@ int SandboxFileStreamWriter::Flush(const net::CompletionCallback& callback) {
return local_file_writer_->Flush(callback);
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/sandbox_file_stream_writer.h b/webkit/browser/fileapi/sandbox_file_stream_writer.h
index 53cbb50..58cae32 100644
--- a/webkit/browser/fileapi/sandbox_file_stream_writer.h
+++ b/webkit/browser/fileapi/sandbox_file_stream_writer.h
@@ -17,7 +17,7 @@
#include "webkit/common/fileapi/file_system_types.h"
#include "webkit/common/quota/quota_types.h"
-namespace fileapi {
+namespace storage {
class FileSystemContext;
class FileSystemQuotaUtil;
@@ -55,10 +55,11 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxFileStreamWriter
base::File::Error file_error,
const base::File::Info& file_info,
const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
+ const scoped_refptr<storage::ShareableFileReference>& file_ref);
void DidGetUsageAndQuota(const net::CompletionCallback& callback,
- quota::QuotaStatusCode status,
- int64 usage, int64 quota);
+ storage::QuotaStatusCode status,
+ int64 usage,
+ int64 quota);
void DidInitializeForWrite(net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback,
int init_status);
@@ -90,6 +91,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxFileStreamWriter
DISALLOW_COPY_AND_ASSIGN(SandboxFileStreamWriter);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_
diff --git a/webkit/browser/fileapi/sandbox_file_system_backend.cc b/webkit/browser/fileapi/sandbox_file_system_backend.cc
index b71c1c4..a0ab15d 100644
--- a/webkit/browser/fileapi/sandbox_file_system_backend.cc
+++ b/webkit/browser/fileapi/sandbox_file_system_backend.cc
@@ -26,10 +26,10 @@
#include "webkit/common/fileapi/file_system_types.h"
#include "webkit/common/fileapi/file_system_util.h"
-using quota::QuotaManagerProxy;
-using quota::SpecialStoragePolicy;
+using storage::QuotaManagerProxy;
+using storage::SpecialStoragePolicy;
-namespace fileapi {
+namespace storage {
SandboxFileSystemBackend::SandboxFileSystemBackend(
SandboxFileSystemBackendDelegate* delegate)
@@ -49,15 +49,13 @@ void SandboxFileSystemBackend::Initialize(FileSystemContext* context) {
DCHECK(delegate_);
// Set quota observers.
- delegate_->RegisterQuotaUpdateObserver(fileapi::kFileSystemTypeTemporary);
+ delegate_->RegisterQuotaUpdateObserver(storage::kFileSystemTypeTemporary);
delegate_->AddFileAccessObserver(
- fileapi::kFileSystemTypeTemporary,
- delegate_->quota_observer(), NULL);
+ storage::kFileSystemTypeTemporary, delegate_->quota_observer(), NULL);
- delegate_->RegisterQuotaUpdateObserver(fileapi::kFileSystemTypePersistent);
+ delegate_->RegisterQuotaUpdateObserver(storage::kFileSystemTypePersistent);
delegate_->AddFileAccessObserver(
- fileapi::kFileSystemTypePersistent,
- delegate_->quota_observer(), NULL);
+ storage::kFileSystemTypePersistent, delegate_->quota_observer(), NULL);
}
void SandboxFileSystemBackend::ResolveURL(
@@ -111,24 +109,24 @@ FileSystemOperation* SandboxFileSystemBackend::CreateFileSystemOperation(
SpecialStoragePolicy* policy = delegate_->special_storage_policy();
if (policy && policy->IsStorageUnlimited(url.origin()))
- operation_context->set_quota_limit_type(quota::kQuotaLimitTypeUnlimited);
+ operation_context->set_quota_limit_type(storage::kQuotaLimitTypeUnlimited);
else
- operation_context->set_quota_limit_type(quota::kQuotaLimitTypeLimited);
+ operation_context->set_quota_limit_type(storage::kQuotaLimitTypeLimited);
return FileSystemOperation::Create(url, context, operation_context.Pass());
}
bool SandboxFileSystemBackend::SupportsStreaming(
- const fileapi::FileSystemURL& url) const {
+ const storage::FileSystemURL& url) const {
return false;
}
bool SandboxFileSystemBackend::HasInplaceCopyImplementation(
- fileapi::FileSystemType type) const {
+ storage::FileSystemType type) const {
return true;
}
-scoped_ptr<webkit_blob::FileStreamReader>
+scoped_ptr<storage::FileStreamReader>
SandboxFileSystemBackend::CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
@@ -140,7 +138,7 @@ SandboxFileSystemBackend::CreateFileStreamReader(
url, offset, expected_modification_time, context);
}
-scoped_ptr<fileapi::FileStreamWriter>
+scoped_ptr<storage::FileStreamWriter>
SandboxFileSystemBackend::CreateFileStreamWriter(
const FileSystemURL& url,
int64 offset,
@@ -160,4 +158,4 @@ SandboxFileSystemBackend::CreateOriginEnumerator() {
return delegate_->CreateOriginEnumerator();
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/sandbox_file_system_backend.h b/webkit/browser/fileapi/sandbox_file_system_backend.h
index 0df2afa..f4673dd 100644
--- a/webkit/browser/fileapi/sandbox_file_system_backend.h
+++ b/webkit/browser/fileapi/sandbox_file_system_backend.h
@@ -19,7 +19,7 @@
#include "webkit/browser/quota/special_storage_policy.h"
#include "webkit/browser/webkit_storage_browser_export.h"
-namespace fileapi {
+namespace storage {
// TEMPORARY or PERSISTENT filesystems, which are placed under the user's
// profile directory in a sandboxed way.
@@ -47,8 +47,8 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
base::File::Error* error_code) const OVERRIDE;
virtual bool SupportsStreaming(const FileSystemURL& url) const OVERRIDE;
virtual bool HasInplaceCopyImplementation(
- fileapi::FileSystemType type) const OVERRIDE;
- virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
+ storage::FileSystemType type) const OVERRIDE;
+ virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
const base::Time& expected_modification_time,
@@ -79,6 +79,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
DISALLOW_COPY_AND_ASSIGN(SandboxFileSystemBackend);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_
diff --git a/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc b/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc
index 6bb2efd..5894969 100644
--- a/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc
+++ b/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc
@@ -28,7 +28,7 @@
#include "webkit/browser/quota/quota_manager_proxy.h"
#include "webkit/common/fileapi/file_system_util.h"
-namespace fileapi {
+namespace storage {
namespace {
@@ -170,27 +170,25 @@ std::string SandboxFileSystemBackendDelegate::GetTypeString(
}
SandboxFileSystemBackendDelegate::SandboxFileSystemBackendDelegate(
- quota::QuotaManagerProxy* quota_manager_proxy,
+ storage::QuotaManagerProxy* quota_manager_proxy,
base::SequencedTaskRunner* file_task_runner,
const base::FilePath& profile_path,
- quota::SpecialStoragePolicy* special_storage_policy,
+ storage::SpecialStoragePolicy* special_storage_policy,
const FileSystemOptions& file_system_options)
: file_task_runner_(file_task_runner),
sandbox_file_util_(new AsyncFileUtilAdapter(
- new ObfuscatedFileUtil(
- special_storage_policy,
- profile_path.Append(kFileSystemDirectory),
- file_system_options.env_override(),
- file_task_runner,
- base::Bind(&GetTypeStringForURL),
- GetKnownTypeStrings(),
- this))),
+ new ObfuscatedFileUtil(special_storage_policy,
+ profile_path.Append(kFileSystemDirectory),
+ file_system_options.env_override(),
+ file_task_runner,
+ base::Bind(&GetTypeStringForURL),
+ GetKnownTypeStrings(),
+ this))),
file_system_usage_cache_(new FileSystemUsageCache(file_task_runner)),
- quota_observer_(new SandboxQuotaObserver(
- quota_manager_proxy,
- file_task_runner,
- obfuscated_file_util(),
- usage_cache())),
+ quota_observer_(new SandboxQuotaObserver(quota_manager_proxy,
+ file_task_runner,
+ obfuscated_file_util(),
+ usage_cache())),
quota_reservation_manager_(new QuotaReservationManager(
scoped_ptr<QuotaReservationManager::QuotaBackend>(
new QuotaBackendImpl(file_task_runner_,
@@ -297,16 +295,16 @@ SandboxFileSystemBackendDelegate::CreateFileSystemOperationContext(
return operation_context.Pass();
}
-scoped_ptr<webkit_blob::FileStreamReader>
+scoped_ptr<storage::FileStreamReader>
SandboxFileSystemBackendDelegate::CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
const base::Time& expected_modification_time,
FileSystemContext* context) const {
if (!IsAccessValid(url))
- return scoped_ptr<webkit_blob::FileStreamReader>();
- return scoped_ptr<webkit_blob::FileStreamReader>(
- webkit_blob::FileStreamReader::CreateForFileSystemFile(
+ return scoped_ptr<storage::FileStreamReader>();
+ return scoped_ptr<storage::FileStreamReader>(
+ storage::FileStreamReader::CreateForFileSystemFile(
context, url, offset, expected_modification_time));
}
@@ -327,7 +325,7 @@ SandboxFileSystemBackendDelegate::CreateFileStreamWriter(
base::File::Error
SandboxFileSystemBackendDelegate::DeleteOriginDataOnFileTaskRunner(
FileSystemContext* file_system_context,
- quota::QuotaManagerProxy* proxy,
+ storage::QuotaManagerProxy* proxy,
const GURL& origin_url,
FileSystemType type) {
DCHECK(file_task_runner_->RunsTasksOnCurrentThread());
@@ -337,11 +335,10 @@ SandboxFileSystemBackendDelegate::DeleteOriginDataOnFileTaskRunner(
bool result = obfuscated_file_util()->DeleteDirectoryForOriginAndType(
origin_url, GetTypeString(type));
if (result && proxy) {
- proxy->NotifyStorageModified(
- quota::QuotaClient::kFileSystem,
- origin_url,
- FileSystemTypeToQuotaStorageType(type),
- -usage);
+ proxy->NotifyStorageModified(storage::QuotaClient::kFileSystem,
+ origin_url,
+ FileSystemTypeToQuotaStorageType(type),
+ -usage);
}
if (result)
@@ -660,7 +657,7 @@ ObfuscatedFileUtil* SandboxFileSystemBackendDelegate::obfuscated_file_util() {
// Declared in obfuscated_file_util.h.
// static
ObfuscatedFileUtil* ObfuscatedFileUtil::CreateForTesting(
- quota::SpecialStoragePolicy* special_storage_policy,
+ storage::SpecialStoragePolicy* special_storage_policy,
const base::FilePath& file_system_directory,
leveldb::Env* env_override,
base::SequencedTaskRunner* file_task_runner) {
@@ -673,4 +670,4 @@ ObfuscatedFileUtil* ObfuscatedFileUtil::CreateForTesting(
NULL);
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/sandbox_file_system_backend_delegate.h b/webkit/browser/fileapi/sandbox_file_system_backend_delegate.h
index 2b67cfc..5209f00 100644
--- a/webkit/browser/fileapi/sandbox_file_system_backend_delegate.h
+++ b/webkit/browser/fileapi/sandbox_file_system_backend_delegate.h
@@ -31,16 +31,16 @@ class SandboxFileSystemBackendDelegateTest;
class SandboxFileSystemTestHelper;
}
-namespace quota {
+namespace storage {
class QuotaManagerProxy;
class SpecialStoragePolicy;
}
-namespace webkit_blob {
+namespace storage {
class FileStreamReader;
}
-namespace fileapi {
+namespace storage {
class AsyncFileUtil;
class FileStreamWriter;
@@ -80,10 +80,10 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackendDelegate
static std::string GetTypeString(FileSystemType type);
SandboxFileSystemBackendDelegate(
- quota::QuotaManagerProxy* quota_manager_proxy,
+ storage::QuotaManagerProxy* quota_manager_proxy,
base::SequencedTaskRunner* file_task_runner,
const base::FilePath& profile_path,
- quota::SpecialStoragePolicy* special_storage_policy,
+ storage::SpecialStoragePolicy* special_storage_policy,
const FileSystemOptions& file_system_options);
virtual ~SandboxFileSystemBackendDelegate();
@@ -114,7 +114,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackendDelegate
const FileSystemURL& url,
FileSystemContext* context,
base::File::Error* error_code) const;
- scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
+ scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
const base::Time& expected_modification_time,
@@ -128,7 +128,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackendDelegate
// FileSystemQuotaUtil overrides.
virtual base::File::Error DeleteOriginDataOnFileTaskRunner(
FileSystemContext* context,
- quota::QuotaManagerProxy* proxy,
+ storage::QuotaManagerProxy* proxy,
const GURL& origin_url,
FileSystemType type) OVERRIDE;
virtual void GetOriginsForTypeOnFileTaskRunner(
@@ -183,7 +183,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackendDelegate
FileSystemUsageCache* usage_cache() { return file_system_usage_cache_.get(); }
SandboxQuotaObserver* quota_observer() { return quota_observer_.get(); }
- quota::SpecialStoragePolicy* special_storage_policy() {
+ storage::SpecialStoragePolicy* special_storage_policy() {
return special_storage_policy_.get();
}
@@ -232,7 +232,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackendDelegate
scoped_ptr<SandboxQuotaObserver> quota_observer_;
scoped_ptr<QuotaReservationManager> quota_reservation_manager_;
- scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
+ scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_;
FileSystemOptions file_system_options_;
@@ -255,6 +255,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackendDelegate
DISALLOW_COPY_AND_ASSIGN(SandboxFileSystemBackendDelegate);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_DELEGATE_H_
diff --git a/webkit/browser/fileapi/sandbox_isolated_origin_database.cc b/webkit/browser/fileapi/sandbox_isolated_origin_database.cc
index 901c4fd..e6fcd39 100644
--- a/webkit/browser/fileapi/sandbox_isolated_origin_database.cc
+++ b/webkit/browser/fileapi/sandbox_isolated_origin_database.cc
@@ -8,7 +8,7 @@
#include "base/logging.h"
#include "webkit/browser/fileapi/sandbox_origin_database.h"
-namespace fileapi {
+namespace storage {
// Special directory name for isolated origin.
const base::FilePath::CharType
@@ -77,4 +77,4 @@ void SandboxIsolatedOriginDatabase::MigrateBackFromObsoleteOriginDatabase(
}
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/sandbox_isolated_origin_database.h b/webkit/browser/fileapi/sandbox_isolated_origin_database.h
index d3a882a..1a948b5 100644
--- a/webkit/browser/fileapi/sandbox_isolated_origin_database.h
+++ b/webkit/browser/fileapi/sandbox_isolated_origin_database.h
@@ -10,7 +10,7 @@
#include "webkit/browser/fileapi/sandbox_origin_database_interface.h"
-namespace fileapi {
+namespace storage {
class SandboxOriginDatabase;
@@ -56,6 +56,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxIsolatedOriginDatabase
DISALLOW_COPY_AND_ASSIGN(SandboxIsolatedOriginDatabase);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_ISOLATED_ORIGIN_DATABASE_H_
diff --git a/webkit/browser/fileapi/sandbox_origin_database.cc b/webkit/browser/fileapi/sandbox_origin_database.cc
index 3bbee52..d65e959 100644
--- a/webkit/browser/fileapi/sandbox_origin_database.cc
+++ b/webkit/browser/fileapi/sandbox_origin_database.cc
@@ -55,7 +55,7 @@ const char* LastPathKey() {
} // namespace
-namespace fileapi {
+namespace storage {
SandboxOriginDatabase::SandboxOriginDatabase(
const base::FilePath& file_system_directory,
@@ -344,4 +344,4 @@ bool SandboxOriginDatabase::GetLastPathNumber(int* number) {
return true;
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/sandbox_origin_database.h b/webkit/browser/fileapi/sandbox_origin_database.h
index 57d2e84..3fff77d 100644
--- a/webkit/browser/fileapi/sandbox_origin_database.h
+++ b/webkit/browser/fileapi/sandbox_origin_database.h
@@ -22,7 +22,7 @@ namespace tracked_objects {
class Location;
}
-namespace fileapi {
+namespace storage {
// All methods of this class other than the constructor may be used only from
// the browser's FILE thread. The constructor may be used on any thread.
@@ -72,6 +72,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxOriginDatabase
DISALLOW_COPY_AND_ASSIGN(SandboxOriginDatabase);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_ORIGIN_DATABASE_H_
diff --git a/webkit/browser/fileapi/sandbox_origin_database_interface.cc b/webkit/browser/fileapi/sandbox_origin_database_interface.cc
index e2f80c5..855e4c3 100644
--- a/webkit/browser/fileapi/sandbox_origin_database_interface.cc
+++ b/webkit/browser/fileapi/sandbox_origin_database_interface.cc
@@ -4,7 +4,7 @@
#include "webkit/browser/fileapi/sandbox_origin_database_interface.h"
-namespace fileapi {
+namespace storage {
SandboxOriginDatabaseInterface::OriginRecord::OriginRecord() {
}
@@ -17,4 +17,4 @@ SandboxOriginDatabaseInterface::OriginRecord::OriginRecord(
SandboxOriginDatabaseInterface::OriginRecord::~OriginRecord() {
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/sandbox_origin_database_interface.h b/webkit/browser/fileapi/sandbox_origin_database_interface.h
index 8b88f93..ed20a5e 100644
--- a/webkit/browser/fileapi/sandbox_origin_database_interface.h
+++ b/webkit/browser/fileapi/sandbox_origin_database_interface.h
@@ -11,7 +11,7 @@
#include "base/files/file_path.h"
#include "webkit/browser/webkit_storage_browser_export.h"
-namespace fileapi {
+namespace storage {
class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxOriginDatabaseInterface {
public:
@@ -50,6 +50,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxOriginDatabaseInterface {
SandboxOriginDatabaseInterface() {}
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_ORIGIN_DATABASE_INTERFACE_H_
diff --git a/webkit/browser/fileapi/sandbox_prioritized_origin_database.cc b/webkit/browser/fileapi/sandbox_prioritized_origin_database.cc
index 55ce362..2f07a57 100644
--- a/webkit/browser/fileapi/sandbox_prioritized_origin_database.cc
+++ b/webkit/browser/fileapi/sandbox_prioritized_origin_database.cc
@@ -12,7 +12,7 @@
#include "webkit/browser/fileapi/sandbox_isolated_origin_database.h"
#include "webkit/browser/fileapi/sandbox_origin_database.h"
-namespace fileapi {
+namespace storage {
namespace {
@@ -220,4 +220,4 @@ SandboxPrioritizedOriginDatabase::GetSandboxOriginDatabase() {
return origin_database_.get();
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/sandbox_prioritized_origin_database.h b/webkit/browser/fileapi/sandbox_prioritized_origin_database.h
index 6f390dc..56fac2c 100644
--- a/webkit/browser/fileapi/sandbox_prioritized_origin_database.h
+++ b/webkit/browser/fileapi/sandbox_prioritized_origin_database.h
@@ -15,7 +15,7 @@ namespace leveldb {
class Env;
}
-namespace fileapi {
+namespace storage {
class ObfuscatedFileUtil;
class SandboxIsolatedOriginDatabase;
@@ -67,6 +67,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxPrioritizedOriginDatabase
DISALLOW_COPY_AND_ASSIGN(SandboxPrioritizedOriginDatabase);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_PRIORITIZED_ORIGIN_DATABASE_H_
diff --git a/webkit/browser/fileapi/sandbox_quota_observer.cc b/webkit/browser/fileapi/sandbox_quota_observer.cc
index 42b6d08..412fd50 100644
--- a/webkit/browser/fileapi/sandbox_quota_observer.cc
+++ b/webkit/browser/fileapi/sandbox_quota_observer.cc
@@ -13,17 +13,18 @@
#include "webkit/browser/quota/quota_manager_proxy.h"
#include "webkit/common/fileapi/file_system_util.h"
-namespace fileapi {
+namespace storage {
SandboxQuotaObserver::SandboxQuotaObserver(
- quota::QuotaManagerProxy* quota_manager_proxy,
+ storage::QuotaManagerProxy* quota_manager_proxy,
base::SequencedTaskRunner* update_notify_runner,
ObfuscatedFileUtil* sandbox_file_util,
FileSystemUsageCache* file_system_usage_cache)
: quota_manager_proxy_(quota_manager_proxy),
update_notify_runner_(update_notify_runner),
sandbox_file_util_(sandbox_file_util),
- file_system_usage_cache_(file_system_usage_cache) {}
+ file_system_usage_cache_(file_system_usage_cache) {
+}
SandboxQuotaObserver::~SandboxQuotaObserver() {}
@@ -41,7 +42,7 @@ void SandboxQuotaObserver::OnUpdate(const FileSystemURL& url,
if (quota_manager_proxy_.get()) {
quota_manager_proxy_->NotifyStorageModified(
- quota::QuotaClient::kFileSystem,
+ storage::QuotaClient::kFileSystem,
url.origin(),
FileSystemTypeToQuotaStorageType(url.type()),
delta);
@@ -83,7 +84,7 @@ void SandboxQuotaObserver::OnEndUpdate(const FileSystemURL& url) {
void SandboxQuotaObserver::OnAccess(const FileSystemURL& url) {
if (quota_manager_proxy_.get()) {
quota_manager_proxy_->NotifyStorageAccessed(
- quota::QuotaClient::kFileSystem,
+ storage::QuotaClient::kFileSystem,
url.origin(),
FileSystemTypeToQuotaStorageType(url.type()));
}
@@ -95,7 +96,7 @@ void SandboxQuotaObserver::SetUsageCacheEnabled(
bool enabled) {
if (quota_manager_proxy_.get()) {
quota_manager_proxy_->SetUsageCacheEnabled(
- quota::QuotaClient::kFileSystem,
+ storage::QuotaClient::kFileSystem,
origin,
FileSystemTypeToQuotaStorageType(type),
enabled);
@@ -136,4 +137,4 @@ void SandboxQuotaObserver::UpdateUsageCacheFile(
file_system_usage_cache_->AtomicUpdateUsageByDelta(usage_file_path, delta);
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/sandbox_quota_observer.h b/webkit/browser/fileapi/sandbox_quota_observer.h
index 2c16860..7a90757 100644
--- a/webkit/browser/fileapi/sandbox_quota_observer.h
+++ b/webkit/browser/fileapi/sandbox_quota_observer.h
@@ -20,11 +20,11 @@ namespace base {
class SequencedTaskRunner;
}
-namespace quota {
+namespace storage {
class QuotaManagerProxy;
}
-namespace fileapi {
+namespace storage {
class FileSystemUsageCache;
class FileSystemURL;
@@ -37,11 +37,10 @@ class SandboxQuotaObserver
public:
typedef std::map<base::FilePath, int64> PendingUpdateNotificationMap;
- SandboxQuotaObserver(
- quota::QuotaManagerProxy* quota_manager_proxy,
- base::SequencedTaskRunner* update_notify_runner,
- ObfuscatedFileUtil* sandbox_file_util,
- FileSystemUsageCache* file_system_usage_cache_);
+ SandboxQuotaObserver(storage::QuotaManagerProxy* quota_manager_proxy,
+ base::SequencedTaskRunner* update_notify_runner,
+ ObfuscatedFileUtil* sandbox_file_util,
+ FileSystemUsageCache* file_system_usage_cache_);
virtual ~SandboxQuotaObserver();
// FileUpdateObserver overrides.
@@ -62,7 +61,7 @@ class SandboxQuotaObserver
base::FilePath GetUsageCachePath(const FileSystemURL& url);
- scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_;
+ scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy_;
scoped_refptr<base::SequencedTaskRunner> update_notify_runner_;
// Not owned; sandbox_file_util_ should have identical lifetime with this.
@@ -77,6 +76,6 @@ class SandboxQuotaObserver
DISALLOW_COPY_AND_ASSIGN(SandboxQuotaObserver);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_QUOTA_OBSERVER_H_
diff --git a/webkit/browser/fileapi/task_runner_bound_observer_list.h b/webkit/browser/fileapi/task_runner_bound_observer_list.h
index 36a3393..a3228ff 100644
--- a/webkit/browser/fileapi/task_runner_bound_observer_list.h
+++ b/webkit/browser/fileapi/task_runner_bound_observer_list.h
@@ -13,7 +13,7 @@
#include "base/sequenced_task_runner.h"
#include "base/threading/thread.h"
-namespace fileapi {
+namespace storage {
// A wrapper for dispatching method.
template <class T, class Method, class Params>
@@ -94,6 +94,6 @@ typedef TaskRunnerBoundObserverList<FileAccessObserver> AccessObserverList;
typedef TaskRunnerBoundObserverList<FileChangeObserver> ChangeObserverList;
typedef TaskRunnerBoundObserverList<FileUpdateObserver> UpdateObserverList;
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_TASK_RUNNER_BOUND_OBSERVER_LIST_H_
diff --git a/webkit/browser/fileapi/timed_task_helper.cc b/webkit/browser/fileapi/timed_task_helper.cc
index 50d1dd00..4794723 100644
--- a/webkit/browser/fileapi/timed_task_helper.cc
+++ b/webkit/browser/fileapi/timed_task_helper.cc
@@ -8,7 +8,7 @@
#include "base/logging.h"
#include "base/sequenced_task_runner.h"
-namespace fileapi {
+namespace storage {
struct TimedTaskHelper::Tracker {
explicit Tracker(TimedTaskHelper* timer) : timer(timer) {}
@@ -89,4 +89,4 @@ void TimedTaskHelper::PostDelayedTask(scoped_ptr<Tracker> tracker,
delay);
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/timed_task_helper.h b/webkit/browser/fileapi/timed_task_helper.h
index fcfb80a..9f9162f 100644
--- a/webkit/browser/fileapi/timed_task_helper.h
+++ b/webkit/browser/fileapi/timed_task_helper.h
@@ -17,7 +17,7 @@ namespace base {
class SequencedTaskRunner;
}
-namespace fileapi {
+namespace storage {
// Works similarly as base::Timer, but takes SequencedTaskRunner and
// runs tasks on it (instead of implicitly bound to a thread).
@@ -54,6 +54,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT TimedTaskHelper {
DISALLOW_COPY_AND_ASSIGN(TimedTaskHelper);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_TIMED_TASK_HELPER_H_
diff --git a/webkit/browser/fileapi/transient_file_util.cc b/webkit/browser/fileapi/transient_file_util.cc
index 4cac5ca..334b5ed 100644
--- a/webkit/browser/fileapi/transient_file_util.cc
+++ b/webkit/browser/fileapi/transient_file_util.cc
@@ -12,9 +12,9 @@
#include "webkit/browser/fileapi/file_system_url.h"
#include "webkit/browser/fileapi/isolated_context.h"
-using webkit_blob::ScopedFile;
+using storage::ScopedFile;
-namespace fileapi {
+namespace storage {
namespace {
@@ -52,4 +52,4 @@ ScopedFile TransientFileUtil::CreateSnapshotFile(
return scoped_file.Pass();
}
-} // namespace fileapi
+} // namespace storage
diff --git a/webkit/browser/fileapi/transient_file_util.h b/webkit/browser/fileapi/transient_file_util.h
index 6ffb48c..0a1d746c 100644
--- a/webkit/browser/fileapi/transient_file_util.h
+++ b/webkit/browser/fileapi/transient_file_util.h
@@ -9,7 +9,7 @@
#include "webkit/browser/fileapi/local_file_util.h"
#include "webkit/browser/webkit_storage_browser_export.h"
-namespace fileapi {
+namespace storage {
class FileSystemOperationContext;
@@ -20,7 +20,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE TransientFileUtil
virtual ~TransientFileUtil() {}
// LocalFileUtil overrides.
- virtual webkit_blob::ScopedFile CreateSnapshotFile(
+ virtual storage::ScopedFile CreateSnapshotFile(
FileSystemOperationContext* context,
const FileSystemURL& url,
base::File::Error* error,
@@ -31,6 +31,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE TransientFileUtil
DISALLOW_COPY_AND_ASSIGN(TransientFileUtil);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_TRANSIENT_FILE_UTIL_H_