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

Unified Diff: chrome/browser/resources/flags.js

Issue 10083028: [WebUI] Remove needless large object literal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove flags.js literal as well Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/plugins.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/flags.js
diff --git a/chrome/browser/resources/flags.js b/chrome/browser/resources/flags.js
index ed22c3d0711100db106981126b5c92b2ededf745..a819b86485129ebd5c3a143e6d5a99154328d388 100644
--- a/chrome/browser/resources/flags.js
+++ b/chrome/browser/resources/flags.js
@@ -6,38 +6,13 @@
* This variable structure is here to document the structure that the template
* expects to correctly populate the page.
*/
-var flagsExperimentsDataFormat = {
- flagsExperiments: [
- {
- internal_name: 'Experiment ID string',
- name: 'Experiment Name',
- description: 'description',
- // enabled is only set if the experiment is single valued.
- enabled: true,
- // choices is only set if the experiment has multiple values.
- choices: [
- {
- internal_name: 'Experiment ID string',
- description: 'description',
- selected: true
- }
- ],
- supported: true,
- supported_platforms: [
- 'Mac',
- 'Linux'
- ],
- }
- ],
- needsRestart: false
-};
/**
* Takes the |flagsExperimentsData| input argument which represents data about
* the currently available experiments and populates the html jstemplate
* with that data. It expects an object structure like the above.
- * @param {Object} flagsExperimentsData Information about available experiments
- * in the format of the flagsExperimentsDataFormat object above.
+ * @param {Object} flagsExperimentsData Information about available experiments.
+ * See returnFlagsExperiments() for the structure of this object.
*/
function renderTemplate(flagsExperimentsData) {
// This is the javascript code that processes the template:
@@ -96,7 +71,32 @@ function restartBrowser() {
* Called by the WebUI to re-populate the page with data representing the
* current state of installed experiments.
* @param {Object} flagsExperimentsData Information about available experiments
- * in the format of the flagsExperimentsDataFormat object above.
+ * in the following format:
+ * {
+ * flagsExperiments: [
+ * {
+ * internal_name: 'Experiment ID string',
+ * name: 'Experiment Name',
+ * description: 'description',
+ * // enabled is only set if the experiment is single valued.
+ * enabled: true,
+ * // choices is only set if the experiment has multiple values.
+ * choices: [
+ * {
+ * internal_name: 'Experiment ID string',
+ * description: 'description',
+ * selected: true
+ * }
+ * ],
+ * supported: true,
+ * supported_platforms: [
+ * 'Mac',
+ * 'Linux'
+ * ],
+ * }
+ * ],
+ * needsRestart: false
+ * }
*/
function returnFlagsExperiments(flagsExperimentsData) {
var bodyContainer = $('body-container');
« no previous file with comments | « no previous file | chrome/browser/resources/plugins.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698