Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: webkit/fileapi/file_system_util.cc

Issue 10578017: Test GURL::spec() usage changes with DEPS rolled to the new version. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/database/database_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « webkit/database/database_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698