| Index: webkit/fileapi/file_system_util.cc
|
| diff --git a/webkit/fileapi/file_system_util.cc b/webkit/fileapi/file_system_util.cc
|
| index 089e4e288d3f81cfcd298090117287a1528be2ab..cf99b77a633e80b7ab1551a940d3c750ff05ccd1 100644
|
| --- a/webkit/fileapi/file_system_util.cc
|
| +++ b/webkit/fileapi/file_system_util.cc
|
| @@ -207,12 +207,14 @@ GURL GetOriginURLFromIdentifier(const std::string& origin_identifier) {
|
| UTF8ToUTF16(origin_identifier));
|
| GURL origin_url(web_security_origin.toString());
|
|
|
| - // We need this work-around for file:/// URIs as
|
| - // createFromDatabaseIdentifier returns empty origin_url for them.
|
| - if (origin_url.spec().empty() &&
|
| - origin_identifier.find("file__") == 0)
|
| + if (origin_url.is_valid())
|
| + return origin_url;
|
| + // Origin identifier for files start with 'file__', not with 'file:', thus
|
| + // GURL can't parse them correctly.
|
| + else if (origin_identifier.find("file__") == 0)
|
| return GURL("file:///");
|
| - return origin_url;
|
| + else
|
| + return GURL();
|
| }
|
|
|
| std::string GetFileSystemTypeString(FileSystemType type) {
|
|
|