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

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

Issue 10443024: Added chrome switch that lets tests override URL path, moved GAIA auth extension from CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
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
new file mode 100644
index 0000000000000000000000000000000000000000..787a7f2ca88ee0b5e3c35c42b106a2b63874a024
--- /dev/null
+++ b/chrome/browser/resources/gaia_auth/util.js
@@ -0,0 +1,27 @@
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function $(id) {
+ return document.getElementById(id);
+}
+
+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;
+}

Powered by Google App Engine
This is Rietveld 408576698