Chromium Code Reviews| Index: chrome/browser/resources/options/manage_profile_overlay.js |
| diff --git a/chrome/browser/resources/options/manage_profile_overlay.js b/chrome/browser/resources/options/manage_profile_overlay.js |
| index c21040bacea680d270bbac0c4229144baed4634e..18cccf2774eec894eabe1fd622d0b858fc55a2e8 100644 |
| --- a/chrome/browser/resources/options/manage_profile_overlay.js |
| +++ b/chrome/browser/resources/options/manage_profile_overlay.js |
| @@ -33,6 +33,9 @@ cr.define('options', function() { |
| // An object containing all known profile names. |
| profileNames_: {}, |
| + // The currently selected icon in the icon grid. |
| + iconGridSelectedURL_: null, |
| + |
| /** |
| * Initialize the page. |
| */ |
| @@ -91,6 +94,7 @@ cr.define('options', function() { |
| * @private |
| */ |
| setProfileInfo_: function(profileInfo) { |
| + this.iconGridSelectedURL_ = profileInfo.iconURL; |
| this.profileInfo_ = profileInfo; |
| $('manage-profile-name').value = profileInfo.name; |
| $('manage-profile-icon-grid').selectedItem = profileInfo.iconURL; |
| @@ -197,6 +201,9 @@ cr.define('options', function() { |
| */ |
| onIconGridSelectionChanged_: function() { |
| var iconURL = $('manage-profile-icon-grid').selectedItem; |
| + if (!iconURL || iconURL == this.iconGridSelectedURL_) |
| + return; |
| + this.iconGridSelectedURL_ = iconURL; |
|
binji
2011/12/12 18:44:52
Shouldn't this be set, even if iconURL is null?
sail
2011/12/12 18:53:58
The iconURL becomes NULL when the overlay is close
|
| chrome.send('profileIconSelectionChanged', |
| [this.profileInfo_.filePath, iconURL]); |
| }, |