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

Side by Side Diff: chrome/browser/resources/options2/browser_options.js

Issue 10453020: fix crash when double-deleting a profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 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 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 var ArrayDataModel = cr.ui.ArrayDataModel; 7 var ArrayDataModel = cr.ui.ArrayDataModel;
8 var RepeatingButton = cr.ui.RepeatingButton; 8 var RepeatingButton = cr.ui.RepeatingButton;
9 9
10 // 10 //
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 * filePath: "/path/to/profile/data/on/disk", 994 * filePath: "/path/to/profile/data/on/disk",
995 * isCurrentProfile: false 995 * isCurrentProfile: false
996 * }; 996 * };
997 * @private 997 * @private
998 */ 998 */
999 setProfilesInfo_: function(profiles) { 999 setProfilesInfo_: function(profiles) {
1000 this.setProfileViewSingle_(profiles.length); 1000 this.setProfileViewSingle_(profiles.length);
1001 // add it to the list, even if the list is hidden so we can access it 1001 // add it to the list, even if the list is hidden so we can access it
1002 // later. 1002 // later.
1003 $('profiles-list').dataModel = new ArrayDataModel(profiles); 1003 $('profiles-list').dataModel = new ArrayDataModel(profiles);
1004 // We got new data, close the open overlay if it's open.
1005 ManageProfileOverlay.getInstance().visible = false;
1004 this.setProfileViewButtonsStatus_(); 1006 this.setProfileViewButtonsStatus_();
1005 }, 1007 },
1006 1008
1007 setGtkThemeButtonEnabled_: function(enabled) { 1009 setGtkThemeButtonEnabled_: function(enabled) {
1008 if (!cr.isChromeOS && navigator.platform.match(/linux|BSD/i)) 1010 if (!cr.isChromeOS && navigator.platform.match(/linux|BSD/i))
1009 $('themes-GTK-button').disabled = !enabled; 1011 $('themes-GTK-button').disabled = !enabled;
1010 }, 1012 },
1011 1013
1012 setThemesResetButtonEnabled_: function(enabled) { 1014 setThemesResetButtonEnabled_: function(enabled) {
1013 $('themes-reset').disabled = !enabled; 1015 $('themes-reset').disabled = !enabled;
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 BrowserOptions.getLoggedInUsername = function() { 1402 BrowserOptions.getLoggedInUsername = function() {
1401 return BrowserOptions.getInstance().username_; 1403 return BrowserOptions.getInstance().username_;
1402 }; 1404 };
1403 } 1405 }
1404 1406
1405 // Export 1407 // Export
1406 return { 1408 return {
1407 BrowserOptions: BrowserOptions 1409 BrowserOptions: BrowserOptions
1408 }; 1410 };
1409 }); 1411 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698