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

Side by Side Diff: chrome/browser/resources/options2/certificate_edit_ca_trust_overlay.js

Issue 10391044: retry 136193 - convert localStrings to loadTimeData for options page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 7 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 cr.define('options', function() { 5 cr.define('options', function() {
6 /** @const */ var OptionsPage = options.OptionsPage; 6 /** @const */ var OptionsPage = options.OptionsPage;
7 7
8 /** 8 /**
9 * CertificateEditCaTrustOverlay class 9 * CertificateEditCaTrustOverlay class
10 * Encapsulated handling of the 'edit ca trust' and 'import ca' overlay pages. 10 * Encapsulated handling of the 'edit ca trust' and 'import ca' overlay pages.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 CertificateEditCaTrustOverlay.show = function(certId, certName) { 116 CertificateEditCaTrustOverlay.show = function(certId, certName) {
117 var self = CertificateEditCaTrustOverlay.getInstance(); 117 var self = CertificateEditCaTrustOverlay.getInstance();
118 self.certId = certId; 118 self.certId = certId;
119 $('certificateEditCaTrustCancelButton').onclick = function(event) { 119 $('certificateEditCaTrustCancelButton').onclick = function(event) {
120 self.cancelEdit_(); 120 self.cancelEdit_();
121 } 121 }
122 $('certificateEditCaTrustOkButton').onclick = function(event) { 122 $('certificateEditCaTrustOkButton').onclick = function(event) {
123 self.finishEdit_(); 123 self.finishEdit_();
124 } 124 }
125 $('certificateEditCaTrustDescription').textContent = 125 $('certificateEditCaTrustDescription').textContent =
126 localStrings.getStringF('certificateEditCaTrustDescriptionFormat', 126 loadTimeData.getStringF('certificateEditCaTrustDescriptionFormat',
127 certName); 127 certName);
128 self.enableInputs_(false); 128 self.enableInputs_(false);
129 OptionsPage.navigateToPage('certificateEditCaTrustOverlay'); 129 OptionsPage.navigateToPage('certificateEditCaTrustOverlay');
130 chrome.send('getCaCertificateTrust', [certId]); 130 chrome.send('getCaCertificateTrust', [certId]);
131 } 131 }
132 132
133 /** 133 /**
134 * Show the Import CA overlay. 134 * Show the Import CA overlay.
135 * @param {string} certId The id of the certificate to be passed to the 135 * @param {string} certId The id of the certificate to be passed to the
136 * certificate manager model. 136 * certificate manager model.
137 * @param {string} certName The display name of the certificate. 137 * @param {string} certName The display name of the certificate.
138 * checkbox. 138 * checkbox.
139 */ 139 */
140 CertificateEditCaTrustOverlay.showImport = function(certName) { 140 CertificateEditCaTrustOverlay.showImport = function(certName) {
141 var self = CertificateEditCaTrustOverlay.getInstance(); 141 var self = CertificateEditCaTrustOverlay.getInstance();
142 // TODO(mattm): do we want a view certificate button here like firefox has? 142 // TODO(mattm): do we want a view certificate button here like firefox has?
143 $('certificateEditCaTrustCancelButton').onclick = function(event) { 143 $('certificateEditCaTrustCancelButton').onclick = function(event) {
144 self.cancelImport_(); 144 self.cancelImport_();
145 } 145 }
146 $('certificateEditCaTrustOkButton').onclick = function(event) { 146 $('certificateEditCaTrustOkButton').onclick = function(event) {
147 self.finishImport_(); 147 self.finishImport_();
148 } 148 }
149 $('certificateEditCaTrustDescription').textContent = 149 $('certificateEditCaTrustDescription').textContent =
150 localStrings.getStringF('certificateImportCaDescriptionFormat', 150 loadTimeData.getStringF('certificateImportCaDescriptionFormat',
151 certName); 151 certName);
152 CertificateEditCaTrustOverlay.populateTrust(false, false, false); 152 CertificateEditCaTrustOverlay.populateTrust(false, false, false);
153 OptionsPage.navigateToPage('certificateEditCaTrustOverlay'); 153 OptionsPage.navigateToPage('certificateEditCaTrustOverlay');
154 } 154 }
155 155
156 CertificateEditCaTrustOverlay.dismiss = function() { 156 CertificateEditCaTrustOverlay.dismiss = function() {
157 CertificateEditCaTrustOverlay.getInstance().dismissOverlay_(); 157 CertificateEditCaTrustOverlay.getInstance().dismissOverlay_();
158 }; 158 };
159 159
160 // Export 160 // Export
161 return { 161 return {
162 CertificateEditCaTrustOverlay: CertificateEditCaTrustOverlay 162 CertificateEditCaTrustOverlay: CertificateEditCaTrustOverlay
163 }; 163 };
164 }); 164 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698