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

Unified Diff: chrome/browser/resources/options/import_data_overlay.js

Issue 6688016: web-ui settings: Fix incorrect handling for the Import dialog when no browser... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/import_data_overlay.js
===================================================================
--- chrome/browser/resources/options/import_data_overlay.js (revision 78473)
+++ chrome/browser/resources/options/import_data_overlay.js (working copy)
@@ -101,11 +101,14 @@
*/
updateCheckboxes_: function() {
var index = $('import-browsers').selectedIndex;
- var browserProfile = ImportDataOverlay.browserProfiles[index];
+ var browserProfile;
+ if (ImportDataOverlay.browserProfiles.length > index)
James Hawkins 2011/03/17 21:49:29 s/ImportDataOverlay/this/ ?
csilv 2011/03/17 22:18:28 Done.
+ browserProfile = ImportDataOverlay.browserProfiles[index];
var importOptions = ['history', 'favorites', 'passwords', 'search'];
for (var i = 0; i < importOptions.length; i++) {
var checkbox = $('import-' + importOptions[i]);
- this.setUpCheckboxState_(checkbox, browserProfile[importOptions[i]]);
+ this.setUpCheckboxState_(checkbox,
+ browserProfile ? browserProfile[importOptions[i]] : false);
}
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698