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

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

Issue 8905001: Fix profile name resetting to GAIA name (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: branch Created 9 years 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/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]);
},
« 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