Chromium Code Reviews| Index: webkit/fileapi/file_system_context.cc |
| diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc |
| index 017cf29f417ed78b3a73a84a6a864fdbf0f909b5..383b1577a1fdc536e9bb149874b82d62c40e9898 100644 |
| --- a/webkit/fileapi/file_system_context.cc |
| +++ b/webkit/fileapi/file_system_context.cc |
| @@ -141,6 +141,7 @@ FileSystemMountPointProvider* FileSystemContext::GetMountPointProvider( |
| case kFileSystemTypeSyncable: |
| return sandbox_provider_.get(); |
| case kFileSystemTypeExternal: |
| + case kFileSystemTypeExternalFullPath: |
| case kFileSystemTypeDrive: |
| case kFileSystemTypeRestrictedNativeLocal: |
| return external_provider_.get(); |
| @@ -349,20 +350,26 @@ FileSystemURL FileSystemContext::CrackFileSystemURL( |
| // The returned value in case there is no crackers which can crack the url. |
| // This is valid situation for non isolated/external file systems. |
| - FileSystemURL result = url; |
| - |
| - for (size_t i = 0; i < url_crackers_.size(); ++i) { |
| - if (!url_crackers_[i]->HandlesFileSystemMountType(url.type())) |
| - continue; |
| - |
| - result = url_crackers_[i]->CreateCrackedFileSystemURL(url.origin(), |
| - url.type(), |
| - url.path()); |
| - if (result.is_valid()) |
| - return result; |
| + FileSystemURL current = url; |
| + |
| + // File system may be mounted multiple times (e.g., an isolated filesystem on |
| + // top of an external filesystem). Hence cracking needs to be iterated. |
| + for (;;) { |
| + FileSystemURL cracked = current; |
| + bool crack_happened = false; |
| + for (size_t i = 0; i < url_crackers_.size(); ++i) { |
| + if (!url_crackers_[i]->HandlesFileSystemMountType(current.type())) |
| + continue; |
| + crack_happened = true; |
| + cracked = url_crackers_[i]->CrackFileSystemURL(current); |
| + if (cracked.is_valid()) |
| + break; |
| + } |
| + if (!crack_happened) |
|
kinuko
2013/03/19 20:34:50
nit: if (cracked == current) may be enough
kinaba
2013/03/21 07:35:13
Done.
|
| + break; |
| + current = cracked; |
| } |
| - |
| - return result; |
| + return current; |
| } |
| FileSystemFileUtil* FileSystemContext::GetFileUtil( |