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

Unified Diff: storage/common/database/database_identifier.cc

Issue 1753403002: Move IsValidOriginIdentifier into appropriate header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: storage/common/database/database_identifier.cc
diff --git a/storage/common/database/database_identifier.cc b/storage/common/database/database_identifier.cc
index 2c1aa552270dcd7cf78b6a031f7114ec7223cc30..8eb498ae1b0cac34bf1a27e44a13c532481947f1 100644
--- a/storage/common/database/database_identifier.cc
+++ b/storage/common/database/database_identifier.cc
@@ -23,6 +23,11 @@ GURL GetOriginFromIdentifier(const std::string& identifier) {
return DatabaseIdentifier::Parse(identifier).ToOrigin();
}
+// static
+bool IsValidOriginIdentifier(const std::string& identifier) {
+ return GetOriginFromIdentifier(identifier).is_valid();
+}
+
static bool SchemeIsUnique(const std::string& scheme) {
return scheme == "about" || scheme == "data" || scheme == "javascript";
}

Powered by Google App Engine
This is Rietveld 408576698