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

Unified Diff: chrome/browser/resources/gaia_auth/util.js

Issue 888173002: cros: Restrict gaiaURL to be http and https only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix blank line Created 5 years, 11 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 | « chrome/browser/resources/gaia_auth/main.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/gaia_auth/util.js
diff --git a/chrome/browser/resources/gaia_auth/util.js b/chrome/browser/resources/gaia_auth/util.js
index 9d8ebd7237d156b6acffdc7f4b347ca3d122eafc..039465ab87cce15c02fc54323cb92939d08b9f68 100644
--- a/chrome/browser/resources/gaia_auth/util.js
+++ b/chrome/browser/resources/gaia_auth/util.js
@@ -72,3 +72,15 @@ function extractDomain(url) {
a.href = url;
return a.hostname;
}
+
+/**
+ * Extract protocol from an URL.
+ * @param {string} url An URL string.
+ * @return {string} The protocol of the URL.
+ */
+function extractProtocol(url) {
+ var a = document.createElement('a');
+ a.href = url;
+ return a.protocol;
+}
+
« no previous file with comments | « chrome/browser/resources/gaia_auth/main.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698