Chromium Code Reviews| Index: webkit/fileapi/isolated_context.cc |
| diff --git a/webkit/fileapi/isolated_context.cc b/webkit/fileapi/isolated_context.cc |
| index 56ba1c00dfa50150d9d453195283a124817dc943..a772899c506ba02690a0714a9276f5b2a54b5426 100644 |
| --- a/webkit/fileapi/isolated_context.cc |
| +++ b/webkit/fileapi/isolated_context.cc |
| @@ -301,26 +301,31 @@ FileSystemURL IsolatedContext::CrackURL(const GURL& url) const { |
| FileSystemURL filesystem_url = FileSystemURL(url); |
| if (!filesystem_url.is_valid()) |
| return FileSystemURL(); |
| - return CreateCrackedFileSystemURL(filesystem_url.origin(), |
| - filesystem_url.mount_type(), |
| - filesystem_url.path()); |
| + return CrackFileSystemURL(filesystem_url); |
| } |
| -FileSystemURL IsolatedContext::CreateCrackedFileSystemURL( |
| - const GURL& origin, |
| - FileSystemType type, |
| - const base::FilePath& path) const { |
| - if (!HandlesFileSystemMountType(type)) |
| +FileSystemURL IsolatedContext::CrackFileSystemURL( |
|
kinuko
2013/03/21 16:47:51
nit: can you match the method order in .cc and .h?
kinaba
2013/03/22 04:58:33
Done.
|
| + const FileSystemURL& url) const { |
| + if (!HandlesFileSystemMountType(url.type())) |
| return FileSystemURL(); |
| std::string mount_name; |
| FileSystemType cracked_type; |
| base::FilePath cracked_path; |
| - if (!CrackVirtualPath(path, &mount_name, &cracked_type, &cracked_path)) |
| + if (!CrackVirtualPath(url.path(), &mount_name, &cracked_type, &cracked_path)) |
| return FileSystemURL(); |
| - return FileSystemURL(origin, type, path, |
| - mount_name, cracked_type, cracked_path); |
| + return FileSystemURL( |
| + url.origin(), url.mount_type(), url.virtual_path(), |
| + !url.filesystem_id().empty() ? url.filesystem_id() : mount_name, |
| + cracked_type, cracked_path, mount_name); |
| +} |
| + |
| +FileSystemURL IsolatedContext::CreateCrackedFileSystemURL( |
| + const GURL& origin, |
| + FileSystemType type, |
| + const base::FilePath& path) const { |
| + return CrackFileSystemURL(FileSystemURL(origin, type, path)); |
| } |
| void IsolatedContext::RevokeFileSystemByPath(const base::FilePath& path_in) { |