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

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

Issue 1086983002: [DevTools] Add "remoteModules" experiment. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | « Source/devtools/devtools.gyp ('k') | Source/devtools/front_end/inspector.json » ('j') | 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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 725
726 /** 726 /**
727 * @return {!Promise.<undefined>} 727 * @return {!Promise.<undefined>}
728 */ 728 */
729 _loadScripts: function() 729 _loadScripts: function()
730 { 730 {
731 if (!this._descriptor.scripts) 731 if (!this._descriptor.scripts)
732 return Promise.resolve(); 732 return Promise.resolve();
733 733
734 if (Runtime.isReleaseMode()) { 734 if (Runtime.isReleaseMode()) {
735 var base = this._descriptor.remote && Runtime._remoteBase || undefin ed; 735 var useRemote = this._descriptor.remote && Runtime.experiments.isEna bled("remoteModules");
736 var base = useRemote && Runtime._remoteBase || undefined;
736 return loadScriptsPromise([this._name + "_module.js"], base); 737 return loadScriptsPromise([this._name + "_module.js"], base);
737 } 738 }
738 739
739 return loadScriptsPromise(this._descriptor.scripts.map(this._modularizeU RL, this)); 740 return loadScriptsPromise(this._descriptor.scripts.map(this._modularizeU RL, this));
740 }, 741 },
741 742
742 /** 743 /**
743 * @param {string} resourceName 744 * @param {string} resourceName
744 */ 745 */
745 _modularizeURL: function(resourceName) 746 _modularizeURL: function(resourceName)
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 window.localStorage[key] = settings[key]; 1053 window.localStorage[key] = settings[key];
1053 } catch(e) { 1054 } catch(e) {
1054 // Ignore malformed settings. 1055 // Ignore malformed settings.
1055 } 1056 }
1056 } 1057 }
1057 })();} 1058 })();}
1058 1059
1059 1060
1060 // This must be constructed after the query parameters have been parsed. 1061 // This must be constructed after the query parameters have been parsed.
1061 Runtime.experiments = new Runtime.ExperimentsSupport(); 1062 Runtime.experiments = new Runtime.ExperimentsSupport();
1063 Runtime.experiments.register("remoteModules", "Remote Modules", true);
1062 1064
1063 /** 1065 /**
1064 * @type {?string} 1066 * @type {?string}
1065 */ 1067 */
1066 Runtime._remoteBase = Runtime.queryParam("remoteBase"); 1068 Runtime._remoteBase = Runtime.queryParam("remoteBase");
1067 1069
1068 /** @type {!Runtime} */ 1070 /** @type {!Runtime} */
1069 var runtime; 1071 var runtime;
OLDNEW
« no previous file with comments | « Source/devtools/devtools.gyp ('k') | Source/devtools/front_end/inspector.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698