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

Side by Side Diff: remoting/webapp/host_controller.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** @suppress {duplicate} */ 7 /** @suppress {duplicate} */
8 var remoting = remoting || {}; 8 var remoting = remoting || {};
9 9
10 /** @constructor */ 10 /** @constructor */
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 if (typeof(result) == 'undefined') { 59 if (typeof(result) == 'undefined') {
60 // If the plug-in can't be instantiated, for example on ChromeOS, then 60 // If the plug-in can't be instantiated, for example on ChromeOS, then
61 // return something sensible. 61 // return something sensible.
62 return remoting.HostController.State.NOT_IMPLEMENTED; 62 return remoting.HostController.State.NOT_IMPLEMENTED;
63 } else { 63 } else {
64 return result; 64 return result;
65 } 65 }
66 }; 66 };
67 67
68 /** 68 /**
69 * @param {function(boolean, boolean):void} callback
70 * Callback to be called when done.
Jamie 2012/06/14 23:43:56 Nit: Indent the description four spaces, and start
alexeypa (please no reviews) 2012/06/19 23:27:29 Done.
71 */
72 remoting.HostController.prototype.getConsent = function(callback) {
73 this.plugin_.getUsageStatsConsent(callback);
74 };
75
76 /**
77 * Records the user's consent to crash dump reporting.
78 * @param {boolean} Whether the user allows crash dump reporting.
Jamie 2012/06/14 23:43:56 You're missing an |allowed| in this JSDoc comment.
alexeypa (please no reviews) 2012/06/19 23:27:29 Done.
79 */
80 remoting.HostController.prototype.setConsent = function(allowed) {
81 this.plugin_.setUsageStatsConsent(allowed);
82 };
83
84 /**
69 * Show or hide daemon-specific parts of the UI. 85 * Show or hide daemon-specific parts of the UI.
70 * @return {void} Nothing. 86 * @return {void} Nothing.
71 */ 87 */
72 remoting.HostController.prototype.updateDom = function() { 88 remoting.HostController.prototype.updateDom = function() {
73 var match = ''; 89 var match = '';
74 var state = this.state(); 90 var state = this.state();
75 switch (state) { 91 switch (state) {
76 case remoting.HostController.State.STARTED: 92 case remoting.HostController.State.STARTED:
77 remoting.updateModalUi('enabled', 'data-daemon-state'); 93 remoting.updateModalUi('enabled', 'data-daemon-state');
78 break; 94 break;
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 try { 379 try {
364 this.plugin_.getDaemonConfig(onConfig); 380 this.plugin_.getDaemonConfig(onConfig);
365 } catch (err) { 381 } catch (err) {
366 this.setHost(null); 382 this.setHost(null);
367 onDone(); 383 onDone();
368 } 384 }
369 }; 385 };
370 386
371 /** @type {remoting.HostController} */ 387 /** @type {remoting.HostController} */
372 remoting.hostController = null; 388 remoting.hostController = null;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698