| OLD | NEW | 
|   1 // Copyright (c) 2010 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  |   6  | 
|   7   var OptionsPage = options.OptionsPage; |   7   var OptionsPage = options.OptionsPage; | 
|   8  |   8  | 
|   9   /** |   9   /** | 
|  10    * CertificateImportErrorOverlay class |  10    * CertificateImportErrorOverlay class | 
|  11    * Displays a list of certificates and errors. |  11    * Displays a list of certificates and errors. | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  43    * @param {Array} certErrors The list of cert errors.  Each error should have |  43    * @param {Array} certErrors The list of cert errors.  Each error should have | 
|  44    *                           a .name and .error attribute. |  44    *                           a .name and .error attribute. | 
|  45    */ |  45    */ | 
|  46   CertificateImportErrorOverlay.show = function(title, message, certErrors) { |  46   CertificateImportErrorOverlay.show = function(title, message, certErrors) { | 
|  47     $('certificateImportErrorOverlayTitle').textContent = title; |  47     $('certificateImportErrorOverlayTitle').textContent = title; | 
|  48     $('certificateImportErrorOverlayMessage').textContent = message; |  48     $('certificateImportErrorOverlayMessage').textContent = message; | 
|  49  |  49  | 
|  50     ul = $('certificateImportErrorOverlayCertErrors'); |  50     ul = $('certificateImportErrorOverlayCertErrors'); | 
|  51     ul.innerHTML = ''; |  51     ul.innerHTML = ''; | 
|  52     for (var i = 0; i < certErrors.length; ++i) { |  52     for (var i = 0; i < certErrors.length; ++i) { | 
|  53       li = document.createElement("li"); |  53       li = document.createElement('li'); | 
|  54       li.textContent = localStrings.getStringF('certificateImportErrorFormat', |  54       li.textContent = localStrings.getStringF('certificateImportErrorFormat', | 
|  55                                                certErrors[i].name, |  55                                                certErrors[i].name, | 
|  56                                                certErrors[i].error); |  56                                                certErrors[i].error); | 
|  57       ul.appendChild(li); |  57       ul.appendChild(li); | 
|  58     } |  58     } | 
|  59  |  59  | 
|  60     OptionsPage.navigateToPage('certificateImportErrorOverlay'); |  60     OptionsPage.navigateToPage('certificateImportErrorOverlay'); | 
|  61   } |  61   } | 
|  62  |  62  | 
|  63   // Export |  63   // Export | 
|  64   return { |  64   return { | 
|  65     CertificateImportErrorOverlay: CertificateImportErrorOverlay |  65     CertificateImportErrorOverlay: CertificateImportErrorOverlay | 
|  66   }; |  66   }; | 
|  67  |  67  | 
|  68 }); |  68 }); | 
| OLD | NEW |