| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 /** | 5 /** |
| 6 * @fileoverview A helper object used from the "Manage certificates" section | 6 * @fileoverview A helper object used from the "Manage certificates" section |
| 7 * to interact with the browser. | 7 * to interact with the browser. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 /** | 10 /** |
| 11 * @typedef {{ | 11 * @typedef {{ |
| 12 * extractable: boolean, | 12 * extractable: boolean, |
| 13 * id: string, | 13 * id: string, |
| 14 * name: string, | 14 * name: string, |
| 15 * policy: boolean, | 15 * policy: boolean, |
| 16 * readonly: boolean, | 16 * readonly: boolean, |
| 17 * untrusted: boolean, | 17 * untrusted: boolean, |
| 18 * urlLocked: boolean | 18 * urlLocked: boolean |
| 19 * }} | 19 * }} |
| 20 * @see chrome/browser/ui/webui/settings/certificates_handler.cc | 20 * @see chrome/browser/ui/webui/settings/certificates_handler.cc |
| 21 */ | 21 */ |
| 22 var CertificateSubnode; | 22 var CertificateSubnode; |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * A data structure describing a certificate that is currently being imported, |
| 26 * therefore it has no ID yet, but it has a name. Used within JS only. |
| 27 * @typedef {{ |
| 28 * name: string, |
| 29 * }} |
| 30 */ |
| 31 var NewCertificateSubNode; |
| 32 |
| 33 /** |
| 25 * @typedef {{ | 34 * @typedef {{ |
| 26 * id: string, | 35 * id: string, |
| 27 * name: string, | 36 * name: string, |
| 28 * subnodes: !Array<!CertificateSubnode> | 37 * subnodes: !Array<!CertificateSubnode> |
| 29 * }} | 38 * }} |
| 30 * @see chrome/browser/ui/webui/settings/certificates_handler.cc | 39 * @see chrome/browser/ui/webui/settings/certificates_handler.cc |
| 31 */ | 40 */ |
| 32 var Certificate; | 41 var Certificate; |
| 33 | 42 |
| 34 /** | 43 /** |
| (...skipping 15 matching lines...) Expand all Loading... |
| 50 */ | 59 */ |
| 51 var CertificatesError; | 60 var CertificatesError; |
| 52 | 61 |
| 53 | 62 |
| 54 /** | 63 /** |
| 55 * Error returned from C++ via a Promise reject callback, when some certificates | 64 * Error returned from C++ via a Promise reject callback, when some certificates |
| 56 * fail to be imported. | 65 * fail to be imported. |
| 57 * @typedef {{ | 66 * @typedef {{ |
| 58 * title: string, | 67 * title: string, |
| 59 * description: string | 68 * description: string |
| 60 * certificateErrors: !Array<{certificateName: string, error: string}> | 69 * certificateErrors: !Array<{name: string, error: string}> |
| 61 * }} | 70 * }} |
| 62 * @see chrome/browser/ui/webui/settings/certificates_handler.cc | 71 * @see chrome/browser/ui/webui/settings/certificates_handler.cc |
| 63 */ | 72 */ |
| 64 var CertificatesImportError; | 73 var CertificatesImportError; |
| 65 | 74 |
| 66 cr.define('settings', function() { | 75 cr.define('settings', function() { |
| 67 /** | 76 /** |
| 68 * Enumeration of all possible certificate types. | 77 * Enumeration of all possible certificate types. |
| 69 * @enum {string} | 78 * @enum {string} |
| 70 */ | 79 */ |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 importServerCertificate: function() { | 267 importServerCertificate: function() { |
| 259 return cr.sendWithPromise('importServerCertificate'); | 268 return cr.sendWithPromise('importServerCertificate'); |
| 260 }, | 269 }, |
| 261 }; | 270 }; |
| 262 | 271 |
| 263 return { | 272 return { |
| 264 CertificatesBrowserProxyImpl: CertificatesBrowserProxyImpl, | 273 CertificatesBrowserProxyImpl: CertificatesBrowserProxyImpl, |
| 265 CertificateType: CertificateType, | 274 CertificateType: CertificateType, |
| 266 }; | 275 }; |
| 267 }); | 276 }); |
| OLD | NEW |