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

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: code review tweaks 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 (this.browserProfiles.length > index)
+ browserProfile = this.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);
}
},
@@ -115,7 +118,7 @@
* @private
*/
updateSupportedBrowsers_: function(browsers) {
- ImportDataOverlay.browserProfiles = browsers;
+ this.browserProfiles = browsers;
var browserSelect = $('import-browsers');
browserSelect.remove(0); // Remove the 'Loading...' option.
browserSelect.textContent = '';
« 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