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

Unified Diff: webkit/database/database_util.cc

Issue 7053007: We need this work-around for file:/// URIs as (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 | « no previous file | webkit/database/database_util_unittest.cc » ('j') | webkit/database/database_util_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/database/database_util.cc
===================================================================
--- webkit/database/database_util.cc (revision 86470)
+++ webkit/database/database_util.cc (working copy)
@@ -77,7 +77,11 @@
GURL DatabaseUtil::GetOriginFromIdentifier(const string16& origin_identifier) {
GURL origin(WebKit::WebSecurityOrigin::createFromDatabaseIdentifier(
origin_identifier).toString());
- DCHECK(origin == origin.GetOrigin());
+ // We need this work-around for file:/// URIs as
+ // createFromDatabaseIdentifier returns empty origin url for them.
+ if (origin.spec().empty() &&
+ origin_identifier.find(ASCIIToUTF16("file__")) == 0)
+ return GURL("file:///");
return origin;
}
« no previous file with comments | « no previous file | webkit/database/database_util_unittest.cc » ('j') | webkit/database/database_util_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698