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

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

Issue 1586903002: [DevTools] Whitelist remoteBase and loadNetworkResource schemes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.cc ('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 /* 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 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 })();} 1086 })();}
1087 1087
1088 1088
1089 // This must be constructed after the query parameters have been parsed. 1089 // This must be constructed after the query parameters have been parsed.
1090 Runtime.experiments = new Runtime.ExperimentsSupport(); 1090 Runtime.experiments = new Runtime.ExperimentsSupport();
1091 1091
1092 /** 1092 /**
1093 * @type {?string} 1093 * @type {?string}
1094 */ 1094 */
1095 Runtime._remoteBase = Runtime.queryParam("remoteBase"); 1095 Runtime._remoteBase = Runtime.queryParam("remoteBase");
1096 {(function validateRemoteBase()
1097 {
1098 if (Runtime._remoteBase && !Runtime._remoteBase.startsWith("https://chrome-d evtools-frontend.appspot.com/"))
1099 Runtime._remoteBase = null;
1100 })();}
1096 1101
1097 /** 1102 /**
1098 * @param {string} path 1103 * @param {string} path
1099 * @return {string} 1104 * @return {string}
1100 */ 1105 */
1101 Runtime.resolveSourceURL = function(path) 1106 Runtime.resolveSourceURL = function(path)
1102 { 1107 {
1103 var sourceURL = window.location.href; 1108 var sourceURL = window.location.href;
1104 if (window.location.search) 1109 if (window.location.search)
1105 sourceURL = sourceURL.replace(window.location.search, ""); 1110 sourceURL = sourceURL.replace(window.location.search, "");
1106 sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf("/") + 1) + path; 1111 sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf("/") + 1) + path;
1107 return "\n/*# sourceURL=" + sourceURL + " */"; 1112 return "\n/*# sourceURL=" + sourceURL + " */";
1108 } 1113 }
1109 1114
1110 /** @type {!Runtime} */ 1115 /** @type {!Runtime} */
1111 var runtime; 1116 var runtime;
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698