Index: chrome/browser/resources/flags.js |
diff --git a/chrome/browser/resources/flags.js b/chrome/browser/resources/flags.js |
index a819b86485129ebd5c3a143e6d5a99154328d388..0bcfa2b03bbf90cd20894a57577177f2dc3ee44b 100644 |
--- a/chrome/browser/resources/flags.js |
+++ b/chrome/browser/resources/flags.js |
@@ -49,6 +49,8 @@ function renderTemplate(flagsExperimentsData) { |
for (var i = 0; i < elements.length; ++i) { |
elements[i].onclick = restartBrowser; |
} |
+ |
+ $('experiment-reset-all').onclick = resetAllFlags; |
} |
/** |
@@ -68,6 +70,15 @@ function restartBrowser() { |
} |
/** |
+ * Reset all flags to their default values and refresh the UI. |
+ */ |
+function resetAllFlags() { |
+ // Asks the C++ FlagsDOMHandler to reset all flags to default values. |
+ chrome.send('resetAllFlags'); |
+ requestFlagsExperimentsData(); |
+} |
+ |
+/** |
* 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 |