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

Unified Diff: dashboard/ui/js/common.js

Issue 11184003: Added support for trace params to MakeURL. This fixes an issue where the trace= url parameter was s… (Closed) Base URL: http://git.chromium.org/chromium/tools/perf.git@master
Patch Set: Created 8 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/ui/js/common.js
diff --git a/dashboard/ui/js/common.js b/dashboard/ui/js/common.js
index d2daebb509a00ffcd3c8ebdb0ef0b8d1b1acd185..43d9d04c85499ca5834ea90a4420d62f19e8e60e 100644
--- a/dashboard/ui/js/common.js
+++ b/dashboard/ui/js/common.js
@@ -90,7 +90,19 @@ function MakeURL(params) {
for (p in params) {
if (!p)
continue;
- url = url + sep + p + '=' + params[p];
+ var new_param = '';
tonyg 2012/10/16 18:28:29 nit: newParam
+ if (typeof params[p] == "object") {
+ // Repeated param
+ var repeated = []
tonyg 2012/10/16 18:28:29 nit: end with semicolon
+ for (r in params[p]) {
+ repeated.push(r + '=' + params[p][r]);
+ }
+ new_param = repeated.join("&");
+ }
+ else {
tonyg 2012/10/16 18:28:29 Bring this up a line
+ new_param = p + '=' + params[p];
+ }
+ url = url + sep + new_param;
sep = '&';
}
return url;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698