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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/Runtime.js

Issue 2444423002: Merge to 2883 "[DevTools] Move sanitize url to devtools_ui.cc." (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 { 1094 {
1095 var queryParams = location.search; 1095 var queryParams = location.search;
1096 if (!queryParams) 1096 if (!queryParams)
1097 return; 1097 return;
1098 var params = queryParams.substring(1).split("&"); 1098 var params = queryParams.substring(1).split("&");
1099 for (var i = 0; i < params.length; ++i) { 1099 for (var i = 0; i < params.length; ++i) {
1100 var pair = params[i].split("="); 1100 var pair = params[i].split("=");
1101 var name = pair.shift(); 1101 var name = pair.shift();
1102 Runtime._queryParamsObject[name] = pair.join("="); 1102 Runtime._queryParamsObject[name] = pair.join("=");
1103 } 1103 }
1104 var flags = Runtime._queryParamsObject["flags"];
1105 delete Runtime._queryParamsObject["flags"];
1106 if (flags) {
1107 try {
1108 var parsedFlags = JSON.parse(window.decodeURIComponent(flags));
1109 for (var key in parsedFlags)
1110 Runtime._queryParamsObject[key] = parsedFlags[key];
1111 } catch(e) {
1112 console.error("Invalid startup flag: " + e);
1113 }
1114 }
1115 })();} 1104 })();}
1116 1105
1117 1106
1118 // This must be constructed after the query parameters have been parsed. 1107 // This must be constructed after the query parameters have been parsed.
1119 Runtime.experiments = new Runtime.ExperimentsSupport(); 1108 Runtime.experiments = new Runtime.ExperimentsSupport();
1120 1109
1121 /** 1110 /**
1122 * @type {?string} 1111 * @type {?string}
1123 */ 1112 */
1124 Runtime._remoteBase = Runtime.queryParam("remoteBase"); 1113 Runtime._remoteBase = Runtime.queryParam("remoteBase");
(...skipping 12 matching lines...) Expand all
1137 { 1126 {
1138 var sourceURL = self.location.href; 1127 var sourceURL = self.location.href;
1139 if (self.location.search) 1128 if (self.location.search)
1140 sourceURL = sourceURL.replace(self.location.search, ""); 1129 sourceURL = sourceURL.replace(self.location.search, "");
1141 sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf("/") + 1) + path; 1130 sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf("/") + 1) + path;
1142 return "\n/*# sourceURL=" + sourceURL + " */"; 1131 return "\n/*# sourceURL=" + sourceURL + " */";
1143 } 1132 }
1144 1133
1145 /** @type {!Runtime} */ 1134 /** @type {!Runtime} */
1146 var runtime; 1135 var runtime;
OLDNEW
« no previous file with comments | « content/renderer/devtools/devtools_client.cc ('k') | third_party/WebKit/Source/devtools/front_end/devtools.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698