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

Side by Side Diff: chrome/browser/resources/gaia_auth/util.js

Issue 10831156: Fix license header for chrome/browser/resources/gaia_auth (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/gaia_auth/test/content.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function $(id) { 5 function $(id) {
6 return document.getElementById(id); 6 return document.getElementById(id);
7 } 7 }
8 8
9 function getUrlSearchParams(search) { 9 function getUrlSearchParams(search) {
10 var params = {}; 10 var params = {};
11 11
12 if (search) { 12 if (search) {
13 // Strips leading '?' 13 // Strips leading '?'
14 search = search.substring(1); 14 search = search.substring(1);
15 var pairs = search.split('&'); 15 var pairs = search.split('&');
16 for (var i = 0; i < pairs.length; ++i) { 16 for (var i = 0; i < pairs.length; ++i) {
17 var pair = pairs[i].split('='); 17 var pair = pairs[i].split('=');
18 if (pair.length == 2) { 18 if (pair.length == 2) {
19 params[pair[0]] = decodeURIComponent(pair[1]); 19 params[pair[0]] = decodeURIComponent(pair[1]);
20 } else { 20 } else {
21 params[pair] = true; 21 params[pair] = true;
22 } 22 }
23 } 23 }
24 } 24 }
25 25
26 return params; 26 return params;
27 } 27 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/gaia_auth/test/content.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698