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

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

Issue 12377095: Add "clear" to about://instant. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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/instant/instant.html ('k') | chrome/browser/ui/webui/instant_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/instant/instant.js
diff --git a/chrome/browser/resources/instant/instant.js b/chrome/browser/resources/instant/instant.js
index 840929017b1879fecc9e0fdc578b3ab3dc7bd1c8..e874fca872930bca9d6cb42b3d137646a918353c 100644
--- a/chrome/browser/resources/instant/instant.js
+++ b/chrome/browser/resources/instant/instant.js
@@ -121,22 +121,6 @@ var instantConfig = (function() {
}
/**
- * Handle processing of "Reset" button.
- * Causes off form values to be updated based on current preference values.
- */
- function onReset() {
- for (var i = 0; i < FIELDS.length; i++) {
- var field = FIELDS[i];
- if ($(field.key).type == 'checkbox')
- $(field.key).checked = field.default;
- else
- $(field.key).value = field.default;
- setPreferenceValue(field.key);
- }
- return false;
- }
-
- /**
* Saves data back into Chrome preferences.
*/
function onSave() {
@@ -170,6 +154,14 @@ var instantConfig = (function() {
}
}
+ /**
+ * Resets list of debug events.
+ */
+ function clearDebugInfo() {
+ $('instant-debug-info').innerHTML = '';
+ chrome.send('clearDebugInfo');
+ }
+
function loadForm() {
for (var i = 0; i < FIELDS.length; i++)
getPreferenceValue(FIELDS[i].key);
@@ -184,8 +176,8 @@ var instantConfig = (function() {
initForm();
getDebugInfo();
- $('reset-button').onclick = onReset.bind(this);
$('save-button').onclick = onSave.bind(this);
+ $('clear-button').onclick = clearDebugInfo.bind(this);
}
return {
« no previous file with comments | « chrome/browser/resources/instant/instant.html ('k') | chrome/browser/ui/webui/instant_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698