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

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

Issue 902493003: cros: Pass gaia_auth init params via postMessage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nits Created 5 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: 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 039465ab87cce15c02fc54323cb92939d08b9f68..1ad55136f41d5f44af562954c4aa34b50114d534 100644
--- a/chrome/browser/resources/gaia_auth/util.js
+++ b/chrome/browser/resources/gaia_auth/util.js
@@ -12,31 +12,6 @@ function $(id) {
}
/**
- * Extract query params from given search string of an URL.
- * @param {string} search The search portion of an URL to extract params.
- * @return {Object} The key value pairs of the extracted params.
- */
-function getUrlSearchParams(search) {
- var params = {};
-
- if (search) {
- // Strips leading '?'
- search = search.substring(1);
- var pairs = search.split('&');
- for (var i = 0; i < pairs.length; ++i) {
- var pair = pairs[i].split('=');
- if (pair.length == 2) {
- params[pair[0]] = decodeURIComponent(pair[1]);
- } else {
- params[pair] = true;
- }
- }
- }
-
- return params;
-}
-
-/**
* Creates a new URL which is the old URL with a GET param of key=value.
* Copied from ui/webui/resources/js/util.js.
* @param {string} url The base URL. There is not sanity checking on the URL so
@@ -72,15 +47,3 @@ 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/offline.js ('k') | chrome/browser/resources/gaia_auth_host/gaia_auth_host.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698