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

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

Issue 22642011: Request profiles info in BrowserOptions.initializePage to populate the profiles list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: .. Created 7 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 // Users section. 173 // Users section.
174 if (loadTimeData.valueExists('profilesInfo')) { 174 if (loadTimeData.valueExists('profilesInfo')) {
175 $('profiles-section').hidden = false; 175 $('profiles-section').hidden = false;
176 176
177 var profilesList = $('profiles-list'); 177 var profilesList = $('profiles-list');
178 options.browser_options.ProfileList.decorate(profilesList); 178 options.browser_options.ProfileList.decorate(profilesList);
179 profilesList.autoExpands = true; 179 profilesList.autoExpands = true;
180 180
181 this.setProfilesInfo_(loadTimeData.getValue('profilesInfo')); 181 this.setProfilesInfo_(loadTimeData.getValue('profilesInfo'));
182 chrome.send('requestProfilesInfo');
Bernhard Bauer 2013/08/09 15:42:21 Maybe add a comment now that the data we have in l
ibra 2013/08/09 16:29:55 Done.
182 183
183 profilesList.addEventListener('change', 184 profilesList.addEventListener('change',
184 this.setProfileViewButtonsStatus_); 185 this.setProfileViewButtonsStatus_);
185 $('profiles-create').onclick = function(event) { 186 $('profiles-create').onclick = function(event) {
186 ManageProfileOverlay.showCreateDialog(); 187 ManageProfileOverlay.showCreateDialog();
187 }; 188 };
188 if (OptionsPage.isSettingsApp()) { 189 if (OptionsPage.isSettingsApp()) {
189 $('profiles-app-list-switch').onclick = function(event) { 190 $('profiles-app-list-switch').onclick = function(event) {
190 var selectedProfile = self.getSelectedProfileItem_(); 191 var selectedProfile = self.getSelectedProfileItem_();
191 chrome.send('switchAppListProfile', [selectedProfile.filePath]); 192 chrome.send('switchAppListProfile', [selectedProfile.filePath]);
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 BrowserOptions.getLoggedInUsername = function() { 1505 BrowserOptions.getLoggedInUsername = function() {
1505 return BrowserOptions.getInstance().username_; 1506 return BrowserOptions.getInstance().username_;
1506 }; 1507 };
1507 } 1508 }
1508 1509
1509 // Export 1510 // Export
1510 return { 1511 return {
1511 BrowserOptions: BrowserOptions 1512 BrowserOptions: BrowserOptions
1512 }; 1513 };
1513 }); 1514 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698