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

Side by Side Diff: chrome/browser/resources/settings/certificate_manager_page/ca_trust_edit_dialog.js

Issue 1772203002: MD Settings: Certificate manager, CA edit trust dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix presubmit error. Created 4 years, 9 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview
7 * 'settings-ca-trust-edit-dialog' is the a dialog allowing the user to edit the
8 * trust lever of a given certificate authority.
9 *
10 * @group Chrome Settings Elements
11 * @element settings-ca-trust-edit-dialog
12 */
13 Polymer({
14 is: 'settings-ca-trust-edit-dialog',
15
16 properties: {
17 /** @private {!settings.CertificatesBrowserProxy} */
18 browserProxy_: Object,
19
20 /** @type {!CertificateSubnode} */
21 model: Object,
22
23 /** @private {?CaTrustInfo} */
24 trustInfo_: Object,
25
26 /** @private {string} */
27 explanationText_: String,
28 },
29
30 /** @override */
31 ready: function() {
32 this.browserProxy_ = settings.CertificatesBrowserProxyImpl.getInstance();
33 },
34
35 /** @override */
36 attached: function() {
37 this.explanationText_ = loadTimeData.getStringF(
38 'certificateManagerCaTrustEditDialogExplanation',
39 this.model.name);
40 this.browserProxy_.getCaCertificateTrust(this.model.id).then(
41 /** @param {!CaTrustInfo} trustInfo */
42 function(trustInfo) {
43 this.trustInfo_ = trustInfo;
44 this.$.dialog.open();
45 }.bind(this));
46 },
47
48 /** @private */
49 onCancelTap_: function() {
50 this.$.dialog.close();
51 },
52
53 /** @private */
54 onOkTap_: function() {
55 this.$.spinner.active = true;
56 this.browserProxy_.editCaCertificateTrust(
57 this.model.id, this.$.ssl.checked,
58 this.$.email.checked, this.$.objSign.checked).then(function() {
59 this.$.spinner.active = false;
60 this.$.dialog.close();
61 }.bind(this),
62 /** @param {!CertificatesError} error */
63 function(error) {
64 // TODO(dpapad): Display error here.
65 });
66 },
67 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698