Chromium Code Reviews| 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.
|
| }; |
| /** |