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

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

Issue 2101243004: [MD settings] certificate manager closure compilation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding file Created 4 years, 5 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
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 /**
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 /** 51 /**
52 * Generic error returned from C++ via a Promise reject callback. 52 * Generic error returned from C++ via a Promise reject callback.
53 * @typedef {{ 53 * @typedef {{
54 * title: string, 54 * title: string,
55 * description: string 55 * description: string
56 * }} 56 * }}
57 * @see chrome/browser/ui/webui/settings/certificates_handler.cc 57 * @see chrome/browser/ui/webui/settings/certificates_handler.cc
58 */ 58 */
59 var CertificatesError; 59 var CertificatesError;
60 60
61 /**
62 * Enumeration of all possible certificate types.
63 * @enum {string}
64 */
65 var CertificateType = {
66 CA: 'ca',
67 OTHER: 'other',
68 PERSONAL: 'personal',
69 SERVER: 'server',
70 };
71
61 72
62 /** 73 /**
63 * Error returned from C++ via a Promise reject callback, when some certificates 74 * Error returned from C++ via a Promise reject callback, when some certificates
64 * fail to be imported. 75 * fail to be imported.
65 * @typedef {{ 76 * @typedef {{
66 * title: string, 77 * title: string,
67 * description: string 78 * description: string,
68 * certificateErrors: !Array<{name: string, error: string}> 79 * certificateErrors: !Array<{name: string, error: string}>
69 * }} 80 * }}
70 * @see chrome/browser/ui/webui/settings/certificates_handler.cc 81 * @see chrome/browser/ui/webui/settings/certificates_handler.cc
71 */ 82 */
72 var CertificatesImportError; 83 var CertificatesImportError;
73 84
74 cr.define('settings', function() { 85 cr.define('settings', function() {
75 /**
76 * Enumeration of all possible certificate types.
77 * @enum {string}
78 */
79 var CertificateType = {
80 CA: 'ca',
81 OTHER: 'other',
82 PERSONAL: 'personal',
83 SERVER: 'server',
84 };
85 86
86 /** @interface */ 87 /** @interface */
87 function CertificatesBrowserProxy() {} 88 function CertificatesBrowserProxy() {}
88 89
89 CertificatesBrowserProxy.prototype = { 90 CertificatesBrowserProxy.prototype = {
90 /** 91 /**
91 * Triggers 5 events in the following order 92 * Triggers 5 events in the following order
92 * 1x 'certificates-model-ready' event. 93 * 1x 'certificates-model-ready' event.
93 * 4x 'certificates-changed' event, one for each certificate category. 94 * 4x 'certificates-changed' event, one for each certificate category.
94 */ 95 */
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 return cr.sendWithPromise('importCaCertificate'); 263 return cr.sendWithPromise('importCaCertificate');
263 }, 264 },
264 265
265 /** @override */ 266 /** @override */
266 importServerCertificate: function() { 267 importServerCertificate: function() {
267 return cr.sendWithPromise('importServerCertificate'); 268 return cr.sendWithPromise('importServerCertificate');
268 }, 269 },
269 }; 270 };
270 271
271 return { 272 return {
273 CertificatesBrowserProxy: CertificatesBrowserProxy,
272 CertificatesBrowserProxyImpl: CertificatesBrowserProxyImpl, 274 CertificatesBrowserProxyImpl: CertificatesBrowserProxyImpl,
273 CertificateType: CertificateType,
274 }; 275 };
275 }); 276 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698