Index: storage/browser/fileapi/plugin_private_file_system_backend.cc |
diff --git a/webkit/browser/fileapi/plugin_private_file_system_backend.cc b/storage/browser/fileapi/plugin_private_file_system_backend.cc |
similarity index 78% |
rename from webkit/browser/fileapi/plugin_private_file_system_backend.cc |
rename to storage/browser/fileapi/plugin_private_file_system_backend.cc |
index 2c8ed3bac8fe8b7c97f5e7f3c60d685c087dff56..502b68c556d7b51d832327b2702991a67e896b6f 100644 |
--- a/webkit/browser/fileapi/plugin_private_file_system_backend.cc |
+++ b/storage/browser/fileapi/plugin_private_file_system_backend.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "webkit/browser/fileapi/plugin_private_file_system_backend.h" |
+#include "storage/browser/fileapi/plugin_private_file_system_backend.h" |
#include <map> |
@@ -10,19 +10,19 @@ |
#include "base/synchronization/lock.h" |
#include "base/task_runner_util.h" |
#include "net/base/net_util.h" |
-#include "webkit/browser/blob/file_stream_reader.h" |
-#include "webkit/browser/fileapi/async_file_util_adapter.h" |
-#include "webkit/browser/fileapi/file_stream_writer.h" |
-#include "webkit/browser/fileapi/file_system_context.h" |
-#include "webkit/browser/fileapi/file_system_operation.h" |
-#include "webkit/browser/fileapi/file_system_operation_context.h" |
-#include "webkit/browser/fileapi/file_system_options.h" |
-#include "webkit/browser/fileapi/isolated_context.h" |
-#include "webkit/browser/fileapi/obfuscated_file_util.h" |
-#include "webkit/browser/fileapi/quota/quota_reservation.h" |
-#include "webkit/common/fileapi/file_system_util.h" |
- |
-namespace fileapi { |
+#include "storage/browser/blob/file_stream_reader.h" |
+#include "storage/browser/fileapi/async_file_util_adapter.h" |
+#include "storage/browser/fileapi/file_stream_writer.h" |
+#include "storage/browser/fileapi/file_system_context.h" |
+#include "storage/browser/fileapi/file_system_operation.h" |
+#include "storage/browser/fileapi/file_system_operation_context.h" |
+#include "storage/browser/fileapi/file_system_options.h" |
+#include "storage/browser/fileapi/isolated_context.h" |
+#include "storage/browser/fileapi/obfuscated_file_util.h" |
+#include "storage/browser/fileapi/quota/quota_reservation.h" |
+#include "storage/common/fileapi/file_system_util.h" |
+ |
+namespace storage { |
class PluginPrivateFileSystemBackend::FileSystemIDToPluginMap { |
public: |
@@ -91,19 +91,19 @@ PluginPrivateFileSystemBackend::PluginPrivateFileSystemBackend( |
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( |
- new AsyncFileUtilAdapter(new ObfuscatedFileUtil( |
- special_storage_policy, |
- base_path_, file_system_options.env_override(), |
- file_task_runner, |
- base::Bind(&FileSystemIDToPluginMap::GetPluginIDForURL, |
- base::Owned(plugin_map_)), |
- std::set<std::string>(), |
- NULL))); |
+ file_util_.reset(new AsyncFileUtilAdapter(new ObfuscatedFileUtil( |
+ special_storage_policy, |
+ base_path_, |
+ file_system_options.env_override(), |
+ file_task_runner, |
+ base::Bind(&FileSystemIDToPluginMap::GetPluginIDForURL, |
+ base::Owned(plugin_map_)), |
+ std::set<std::string>(), |
+ NULL))); |
} |
PluginPrivateFileSystemBackend::~PluginPrivateFileSystemBackend() { |
@@ -127,13 +127,16 @@ void PluginPrivateFileSystemBackend::OpenPrivateFileSystem( |
return; |
} |
- PostTaskAndReplyWithResult( |
- file_task_runner_.get(), |
- FROM_HERE, |
- base::Bind(&OpenFileSystemOnFileTaskRunner, |
- obfuscated_file_util(), plugin_map_, |
- origin_url, filesystem_id, plugin_id, mode), |
- callback); |
+ PostTaskAndReplyWithResult(file_task_runner_.get(), |
+ FROM_HERE, |
+ base::Bind(&OpenFileSystemOnFileTaskRunner, |
+ obfuscated_file_util(), |
+ plugin_map_, |
+ origin_url, |
+ filesystem_id, |
+ plugin_id, |
+ mode), |
+ callback); |
} |
bool PluginPrivateFileSystemBackend::CanHandleType(FileSystemType type) const { |
@@ -151,12 +154,12 @@ void PluginPrivateFileSystemBackend::ResolveURL( |
// ResolveURL. |
base::MessageLoopProxy::current()->PostTask( |
FROM_HERE, |
- base::Bind(callback, GURL(), std::string(), |
- base::File::FILE_ERROR_SECURITY)); |
+ base::Bind( |
+ callback, GURL(), std::string(), base::File::FILE_ERROR_SECURITY)); |
} |
-AsyncFileUtil* |
-PluginPrivateFileSystemBackend::GetAsyncFileUtil(FileSystemType type) { |
+AsyncFileUtil* PluginPrivateFileSystemBackend::GetAsyncFileUtil( |
+ FileSystemType type) { |
return file_util_.get(); |
} |
@@ -179,17 +182,17 @@ FileSystemOperation* PluginPrivateFileSystemBackend::CreateFileSystemOperation( |
} |
bool PluginPrivateFileSystemBackend::SupportsStreaming( |
- const fileapi::FileSystemURL& url) const { |
+ const storage::FileSystemURL& url) 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> |
@@ -266,17 +269,20 @@ PluginPrivateFileSystemBackend::CreateQuotaReservationOnFileTaskRunner( |
void PluginPrivateFileSystemBackend::AddFileUpdateObserver( |
FileSystemType type, |
FileUpdateObserver* observer, |
- base::SequencedTaskRunner* task_runner) {} |
+ base::SequencedTaskRunner* task_runner) { |
+} |
void PluginPrivateFileSystemBackend::AddFileChangeObserver( |
FileSystemType type, |
FileChangeObserver* observer, |
- base::SequencedTaskRunner* task_runner) {} |
+ base::SequencedTaskRunner* task_runner) { |
+} |
void PluginPrivateFileSystemBackend::AddFileAccessObserver( |
FileSystemType type, |
FileAccessObserver* observer, |
- base::SequencedTaskRunner* task_runner) {} |
+ base::SequencedTaskRunner* task_runner) { |
+} |
const UpdateObserverList* PluginPrivateFileSystemBackend::GetUpdateObservers( |
FileSystemType type) const { |
@@ -298,4 +304,4 @@ ObfuscatedFileUtil* PluginPrivateFileSystemBackend::obfuscated_file_util() { |
static_cast<AsyncFileUtilAdapter*>(file_util_.get())->sync_file_util()); |
} |
-} // namespace fileapi |
+} // namespace storage |