diff options
author | calvinlo@chromium.org <calvinlo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-27 10:59:13 +0000 |
---|---|---|
committer | calvinlo@chromium.org <calvinlo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-27 10:59:13 +0000 |
commit | 6cd128d23c9c576ce449fcc3022ce58876601f49 (patch) | |
tree | b785c7fa93e4c43588ba802a65673eb47d11b196 /webkit/fileapi/syncable/syncable_file_system_util.cc | |
parent | 933df47c743604207d9d0836dff94a20eddd24f6 (diff) | |
download | chromium_src-6cd128d23c9c576ce449fcc3022ce58876601f49.zip chromium_src-6cd128d23c9c576ce449fcc3022ce58876601f49.tar.gz chromium_src-6cd128d23c9c576ce449fcc3022ce58876601f49.tar.bz2 |
Final patch to migrate all files under webkit/fileapi/syncable from fileapi namespace to sync_file_system namespace.
BUG=174870
Review URL: https://codereview.chromium.org/12313144
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184928 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/syncable/syncable_file_system_util.cc')
-rw-r--r-- | webkit/fileapi/syncable/syncable_file_system_util.cc | 24 |
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 |