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

Unified Diff: remoting/webapp/host_setup_dialog.js

Issue 10537182: The user's consent to crash dumps reporting can now be set via the UI (Windows only). The checkbox … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
Index: remoting/webapp/host_setup_dialog.js
diff --git a/remoting/webapp/host_setup_dialog.js b/remoting/webapp/host_setup_dialog.js
index 1e80910434f264103280808bec8e6d1f2fdef5bc..ba0eb55b16b3013b4dd0cf676ac20ed162790114 100644
--- a/remoting/webapp/host_setup_dialog.js
+++ b/remoting/webapp/host_setup_dialog.js
@@ -136,6 +136,27 @@ remoting.HostSetupDialog = function(hostController) {
this.pinEntry_.addEventListener('keypress', onDaemonPinEntryKeyPress, false);
this.pinEntry_.addEventListener('keypress', noDigitsInPin, false);
this.pinConfirm_.addEventListener('keypress', noDigitsInPin, false);
+
+ this.usageStatsConsent_ = document.getElementById('usagestats-consent');
+
+ /**
+ * @param {boolean} set_by_policy True if crash dump reporting is allowed by
Jamie 2012/06/14 23:43:56 s/allowed/controlled/ (it might be disabled by pol
alexeypa (please no reviews) 2012/06/19 23:27:29 Done.
+ * the policy.
Jamie 2012/06/14 23:43:56 s/the//
alexeypa (please no reviews) 2012/06/19 23:27:29 Done.
+ * @param {boolean} allowed True if crash dumps reporting is allowed.
+ */
+ var onGetConsent = function(set_by_policy, allowed) {
+ that.usageStatsConsent_.disabled = set_by_policy;
+ that.usageStatsConsent_.checked = allowed;
+ }
+ this.hostController_.getConsent(onGetConsent);
Jamie 2012/06/14 23:43:56 This belongs in showForStart. I suspect it won't m
alexeypa (please no reviews) 2012/06/19 23:27:29 Done.
+
+ /** @param {boolean} Whether the consent checkbox is selected. */
+ var onConsentChange = function(checked) {
+ that.hostController_.setConsent(checked);
+ };
+ this.usageStatsConsent_.onchange = function() {
+ onConsentChange(this.checked);
+ };
Jamie 2012/06/14 23:43:56 I think this would be better handled by deferring
alexeypa (please no reviews) 2012/06/19 23:27:29 Done.
};
/**

Powered by Google App Engine
This is Rietveld 408576698