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

Unified Diff: webkit/browser/fileapi/file_system_context.cc

Issue 18344013: fileapi: Rename FileSystemMountProvider to FileSystemBackend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/browser/fileapi/file_system_context.cc
diff --git a/webkit/browser/fileapi/file_system_context.cc b/webkit/browser/fileapi/file_system_context.cc
index 97f420570fa9bc1b9cd7477b5df64ee8d284099c..6768cfe2131df0bdc8daf3e0df01cc46b01785eb 100644
--- a/webkit/browser/fileapi/file_system_context.cc
+++ b/webkit/browser/fileapi/file_system_context.cc
@@ -21,9 +21,9 @@
#include "webkit/browser/fileapi/file_system_task_runners.h"
#include "webkit/browser/fileapi/file_system_url.h"
#include "webkit/browser/fileapi/isolated_context.h"
-#include "webkit/browser/fileapi/isolated_mount_point_provider.h"
+#include "webkit/browser/fileapi/isolated_file_system_backend.h"
#include "webkit/browser/fileapi/mount_points.h"
-#include "webkit/browser/fileapi/sandbox_mount_point_provider.h"
+#include "webkit/browser/fileapi/sandbox_file_system_backend.h"
#include "webkit/browser/fileapi/syncable/local_file_change_tracker.h"
#include "webkit/browser/fileapi/syncable/local_file_sync_context.h"
#include "webkit/browser/fileapi/syncable/syncable_file_system_util.h"
@@ -104,20 +104,20 @@ FileSystemContext::FileSystemContext(
ExternalMountPoints* external_mount_points,
quota::SpecialStoragePolicy* special_storage_policy,
quota::QuotaManagerProxy* quota_manager_proxy,
- ScopedVector<FileSystemMountPointProvider> additional_providers,
+ ScopedVector<FileSystemBackend> additional_backends,
const base::FilePath& partition_path,
const FileSystemOptions& options)
: task_runners_(task_runners.Pass()),
quota_manager_proxy_(quota_manager_proxy),
- sandbox_provider_(
- new SandboxMountPointProvider(
+ sandbox_backend_(
+ new SandboxFileSystemBackend(
quota_manager_proxy,
task_runners_->file_task_runner(),
partition_path,
options,
special_storage_policy)),
- isolated_provider_(new IsolatedMountPointProvider()),
- additional_providers_(additional_providers.Pass()),
+ isolated_backend_(new IsolatedFileSystemBackend()),
+ additional_backends_(additional_backends.Pass()),
external_mount_points_(external_mount_points),
partition_path_(partition_path),
operation_runner_(new FileSystemOperationRunner(this)) {
@@ -128,12 +128,12 @@ FileSystemContext::FileSystemContext(
this, options.is_incognito()));
}
- RegisterMountPointProvider(sandbox_provider_.get());
- RegisterMountPointProvider(isolated_provider_.get());
+ RegisterMountPointProvider(sandbox_backend_.get());
+ RegisterMountPointProvider(isolated_backend_.get());
- for (ScopedVector<FileSystemMountPointProvider>::const_iterator iter =
- additional_providers_.begin();
- iter != additional_providers_.end(); ++iter) {
+ for (ScopedVector<FileSystemBackend>::const_iterator iter =
+ additional_backends_.begin();
+ iter != additional_backends_.end(); ++iter) {
RegisterMountPointProvider(*iter);
}
@@ -154,7 +154,7 @@ bool FileSystemContext::DeleteDataForOriginOnFileThread(
for (MountPointProviderMap::iterator iter = provider_map_.begin();
iter != provider_map_.end();
++iter) {
- FileSystemMountPointProvider* provider = iter->second;
+ FileSystemBackend* provider = iter->second;
if (!provider->GetQuotaUtil())
continue;
if (provider->GetQuotaUtil()->DeleteOriginDataOnFileThread(
@@ -170,7 +170,7 @@ bool FileSystemContext::DeleteDataForOriginOnFileThread(
FileSystemQuotaUtil*
FileSystemContext::GetQuotaUtil(FileSystemType type) const {
- FileSystemMountPointProvider* mount_point_provider =
+ FileSystemBackend* mount_point_provider =
kinuko 2013/07/04 08:44:35 maybe just do s/mount_point_provider/file_system_b
satorux1 2013/07/05 04:47:57 Done.
GetMountPointProvider(type);
if (!mount_point_provider)
return NULL;
@@ -179,7 +179,7 @@ FileSystemContext::GetQuotaUtil(FileSystemType type) const {
AsyncFileUtil* FileSystemContext::GetAsyncFileUtil(
FileSystemType type) const {
- FileSystemMountPointProvider* mount_point_provider =
+ FileSystemBackend* mount_point_provider =
GetMountPointProvider(type);
if (!mount_point_provider)
return NULL;
@@ -188,7 +188,7 @@ AsyncFileUtil* FileSystemContext::GetAsyncFileUtil(
FileSystemFileUtil* FileSystemContext::GetFileUtil(
FileSystemType type) const {
- FileSystemMountPointProvider* mount_point_provider =
+ FileSystemBackend* mount_point_provider =
GetMountPointProvider(type);
if (!mount_point_provider)
return NULL;
@@ -200,7 +200,7 @@ FileSystemContext::GetCopyOrMoveFileValidatorFactory(
FileSystemType type, base::PlatformFileError* error_code) const {
DCHECK(error_code);
*error_code = base::PLATFORM_FILE_OK;
- FileSystemMountPointProvider* mount_point_provider =
+ FileSystemBackend* mount_point_provider =
GetMountPointProvider(type);
if (!mount_point_provider)
return NULL;
@@ -208,7 +208,7 @@ FileSystemContext::GetCopyOrMoveFileValidatorFactory(
type, error_code);
}
-FileSystemMountPointProvider* FileSystemContext::GetMountPointProvider(
+FileSystemBackend* FileSystemContext::GetMountPointProvider(
FileSystemType type) const {
MountPointProviderMap::const_iterator found = provider_map_.find(type);
if (found != provider_map_.end())
@@ -223,16 +223,16 @@ bool FileSystemContext::IsSandboxFileSystem(FileSystemType type) const {
const UpdateObserverList* FileSystemContext::GetUpdateObservers(
FileSystemType type) const {
- // Currently update observer is only available in SandboxMountPointProvider
+ // Currently update observer is only available in SandboxFileSystemBackend
// and TestMountPointProvider.
// TODO(kinuko): Probably GetUpdateObservers() virtual method should be
- // added to FileSystemMountPointProvider interface and be called like
+ // added to FileSystemBackend interface and be called like
// other GetFoo() methods do.
- if (sandbox_provider_->CanHandleType(type))
- return sandbox_provider_->GetUpdateObservers(type);
+ if (sandbox_backend_->CanHandleType(type))
+ return sandbox_backend_->GetUpdateObservers(type);
if (type != kFileSystemTypeTest)
return NULL;
- FileSystemMountPointProvider* mount_point_provider =
+ FileSystemBackend* mount_point_provider =
GetMountPointProvider(type);
return static_cast<TestMountPointProvider*>(
mount_point_provider)->GetUpdateObservers(type);
@@ -240,9 +240,9 @@ const UpdateObserverList* FileSystemContext::GetUpdateObservers(
const AccessObserverList* FileSystemContext::GetAccessObservers(
FileSystemType type) const {
- // Currently access observer is only available in SandboxMountPointProvider.
- if (sandbox_provider_->CanHandleType(type))
- return sandbox_provider_->GetAccessObservers(type);
+ // Currently access observer is only available in SandboxFileSystemBackend.
+ if (sandbox_backend_->CanHandleType(type))
+ return sandbox_backend_->GetAccessObservers(type);
return NULL;
}
@@ -254,9 +254,9 @@ void FileSystemContext::GetFileSystemTypes(
types->push_back(iter->first);
}
-ExternalFileSystemMountPointProvider*
+ExternalFileSystemBackend*
FileSystemContext::external_provider() const {
- return static_cast<ExternalFileSystemMountPointProvider*>(
+ return static_cast<ExternalFileSystemBackend*>(
GetMountPointProvider(kFileSystemTypeExternal));
}
@@ -267,7 +267,7 @@ void FileSystemContext::OpenFileSystem(
const OpenFileSystemCallback& callback) {
DCHECK(!callback.is_null());
- FileSystemMountPointProvider* mount_point_provider =
+ FileSystemBackend* mount_point_provider =
GetMountPointProvider(type);
if (!mount_point_provider) {
callback.Run(base::PLATFORM_FILE_ERROR_SECURITY, std::string(), GURL());
@@ -291,7 +291,7 @@ void FileSystemContext::DeleteFileSystem(
FileSystemType type,
const DeleteFileSystemCallback& callback) {
DCHECK(origin_url == origin_url.GetOrigin());
- FileSystemMountPointProvider* mount_point_provider =
+ FileSystemBackend* mount_point_provider =
GetMountPointProvider(type);
if (!mount_point_provider) {
callback.Run(base::PLATFORM_FILE_ERROR_SECURITY);
@@ -308,7 +308,7 @@ FileSystemContext::CreateFileStreamReader(
const base::Time& expected_modification_time) {
if (!url.is_valid())
return scoped_ptr<webkit_blob::FileStreamReader>();
- FileSystemMountPointProvider* mount_point_provider =
+ FileSystemBackend* mount_point_provider =
GetMountPointProvider(url.type());
if (!mount_point_provider)
return scoped_ptr<webkit_blob::FileStreamReader>();
@@ -321,7 +321,7 @@ scoped_ptr<FileStreamWriter> FileSystemContext::CreateFileStreamWriter(
int64 offset) {
if (!url.is_valid())
return scoped_ptr<FileStreamWriter>();
- FileSystemMountPointProvider* mount_point_provider =
+ FileSystemBackend* mount_point_provider =
GetMountPointProvider(url.type());
if (!mount_point_provider)
return scoped_ptr<FileStreamWriter>();
@@ -333,11 +333,11 @@ void FileSystemContext::SetLocalFileChangeTracker(
DCHECK(!change_tracker_.get());
DCHECK(tracker.get());
change_tracker_ = tracker.Pass();
- sandbox_provider_->AddFileUpdateObserver(
+ sandbox_backend_->AddFileUpdateObserver(
kFileSystemTypeSyncable,
change_tracker_.get(),
task_runners_->file_task_runner());
- sandbox_provider_->AddFileChangeObserver(
+ sandbox_backend_->AddFileChangeObserver(
kFileSystemTypeSyncable,
change_tracker_.get(),
task_runners_->file_task_runner());
@@ -361,7 +361,7 @@ FileSystemURL FileSystemContext::CreateCrackedFileSystemURL(
#if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD)
void FileSystemContext::EnableTemporaryFileSystemInIncognito() {
- sandbox_provider_->set_enable_temporary_file_system_in_incognito(true);
+ sandbox_backend_->set_enable_temporary_file_system_in_incognito(true);
}
#endif
@@ -386,7 +386,7 @@ FileSystemOperation* FileSystemContext::CreateFileSystemOperation(
return NULL;
}
- FileSystemMountPointProvider* mount_point_provider =
+ FileSystemBackend* mount_point_provider =
GetMountPointProvider(url.type());
if (!mount_point_provider) {
if (error_code)
@@ -432,7 +432,7 @@ FileSystemURL FileSystemContext::CrackFileSystemURL(
}
void FileSystemContext::RegisterMountPointProvider(
- FileSystemMountPointProvider* provider) {
+ FileSystemBackend* provider) {
const FileSystemType mount_types[] = {
kFileSystemTypeTemporary,
kFileSystemTypePersistent,

Powered by Google App Engine
This is Rietveld 408576698