summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/syncable/syncable_file_system_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/fileapi/syncable/syncable_file_system_util.cc')
-rw-r--r--webkit/fileapi/syncable/syncable_file_system_util.cc24
1 files changed, 15 insertions, 9 deletions
diff --git a/webkit/fileapi/syncable/syncable_file_system_util.cc b/webkit/fileapi/syncable/syncable_file_system_util.cc
index efb9122..bceb096 100644
--- a/webkit/fileapi/syncable/syncable_file_system_util.cc
+++ b/webkit/fileapi/syncable/syncable_file_system_util.cc
@@ -10,11 +10,16 @@
#include "webkit/fileapi/file_system_util.h"
#include "webkit/fileapi/sandbox_mount_point_provider.h"
-namespace fileapi {
+using fileapi::ExternalMountPoints;
+using fileapi::FileSystemContext;
+using fileapi::FileSystemURL;
+using fileapi::LocalFileSystemOperation;
+
+namespace sync_file_system {
bool RegisterSyncableFileSystem(const std::string& service_name) {
return ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
- service_name, kFileSystemTypeSyncable, base::FilePath());
+ service_name, fileapi::kFileSystemTypeSyncable, base::FilePath());
}
bool RevokeSyncableFileSystem(const std::string& service_name) {
@@ -24,7 +29,8 @@ bool RevokeSyncableFileSystem(const std::string& service_name) {
GURL GetSyncableFileSystemRootURI(const GURL& origin,
const std::string& service_name) {
- const GURL url = GetFileSystemRootURI(origin, kFileSystemTypeExternal);
+ const GURL url = GetFileSystemRootURI(origin,
+ fileapi::kFileSystemTypeExternal);
const std::string path = service_name + "/";
url_canon::Replacements<char> replacements;
replacements.SetPath(path.c_str(), url_parse::Component(0, path.length()));
@@ -36,13 +42,13 @@ FileSystemURL CreateSyncableFileSystemURL(const GURL& origin,
const base::FilePath& path) {
return ExternalMountPoints::GetSystemInstance()->CreateCrackedFileSystemURL(
origin,
- kFileSystemTypeExternal,
+ fileapi::kFileSystemTypeExternal,
base::FilePath::FromUTF8Unsafe(service_name).Append(path));
}
bool SerializeSyncableFileSystemURL(const FileSystemURL& url,
std::string* serialized_url) {
- if (!url.is_valid() || url.type() != kFileSystemTypeSyncable)
+ if (!url.is_valid() || url.type() != fileapi::kFileSystemTypeSyncable)
return false;
*serialized_url =
GetSyncableFileSystemRootURI(url.origin(), url.filesystem_id()).spec() +
@@ -59,7 +65,7 @@ bool DeserializeSyncableFileSystemURL(
FileSystemURL deserialized =
ExternalMountPoints::GetSystemInstance()->CrackURL(GURL(serialized_url));
if (!deserialized.is_valid() ||
- deserialized.type() != kFileSystemTypeSyncable) {
+ deserialized.type() != fileapi::kFileSystemTypeSyncable) {
return false;
}
@@ -67,11 +73,11 @@ bool DeserializeSyncableFileSystemURL(
return true;
}
-LocalFileSystemOperation*
-CreateFileSystemOperationForSync(FileSystemContext* file_system_context) {
+LocalFileSystemOperation* CreateFileSystemOperationForSync(
+ FileSystemContext* file_system_context) {
DCHECK(file_system_context);
return file_system_context->sandbox_provider()->
CreateFileSystemOperationForSync(file_system_context);
}
-} // namespace fileapi
+} // namespace sync_file_system