summaryrefslogtreecommitdiffstats
path: root/webkit/database/database_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/database/database_util.cc')
-rw-r--r--webkit/database/database_util.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/database/database_util.cc b/webkit/database/database_util.cc
index 4866b30..bf5b901 100644
--- a/webkit/database/database_util.cc
+++ b/webkit/database/database_util.cc
@@ -5,6 +5,8 @@
#include "webkit/database/database_util.h"
#include "base/string_util.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "webkit/database/database_tracker.h"
#include "webkit/database/vfs_backend.h"
@@ -64,4 +66,9 @@ FilePath DatabaseUtil::GetFullFilePathForVfsFile(
return full_path;
}
+string16 DatabaseUtil::GetOriginIdentifier(const GURL& url) {
+ string16 spec = UTF8ToUTF16(url.spec());
+ return WebKit::WebSecurityOrigin::createFromString(spec).databaseIdentifier();
+}
+
} // namespace webkit_database