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

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

Issue 12276012: Add reset all button to flags page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ResetAllFlags throughout Created 7 years, 10 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 | « chrome/browser/resources/flags.html ('k') | chrome/browser/ui/webui/flags_ui.cc » ('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 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
« no previous file with comments | « chrome/browser/resources/flags.html ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698