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

Side by Side Diff: chrome/browser/resources/options2/chromeos/accounts_user_list.js

Issue 10834109: Consistently decorate pref values sent to the settings UI code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Silly me, made a CrOS-only change and tested it on a desktop build... Created 8 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 | 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.accounts', function() { 5 cr.define('options.accounts', function() {
6 /** @const */ var List = cr.ui.List; 6 /** @const */ var List = cr.ui.List;
7 /** @const */ var ListItem = cr.ui.ListItem; 7 /** @const */ var ListItem = cr.ui.ListItem;
8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
9 9
10 /** 10 /**
(...skipping 14 matching lines...) Expand all
25 List.prototype.decorate.call(this); 25 List.prototype.decorate.call(this);
26 26
27 // HACK(arv): http://crbug.com/40902 27 // HACK(arv): http://crbug.com/40902
28 window.addEventListener('resize', this.redraw.bind(this)); 28 window.addEventListener('resize', this.redraw.bind(this));
29 29
30 var self = this; 30 var self = this;
31 31
32 // Listens to pref changes. 32 // Listens to pref changes.
33 Preferences.getInstance().addEventListener(this.pref, 33 Preferences.getInstance().addEventListener(this.pref,
34 function(event) { 34 function(event) {
35 self.load_(event.value); 35 self.load_(event.value.value);
36 }); 36 });
37 }, 37 },
38 38
39 createItem: function(user) { 39 createItem: function(user) {
40 return new UserListItem(user); 40 return new UserListItem(user);
41 }, 41 },
42 42
43 /** 43 /**
44 * Finds the index of user by given username (canonicalized email). 44 * Finds the index of user by given username (canonicalized email).
45 * @private 45 * @private
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 updatePicture: function() { 185 updatePicture: function() {
186 this.icon_.src = 'chrome://userimage/' + this.user.username + 186 this.icon_.src = 'chrome://userimage/' + this.user.username +
187 '?id=' + (new Date()).getTime(); 187 '?id=' + (new Date()).getTime();
188 } 188 }
189 }; 189 };
190 190
191 return { 191 return {
192 UserList: UserList 192 UserList: UserList
193 }; 193 };
194 }); 194 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/browser_options.js ('k') | chrome/browser/resources/options2/chromeos/network_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698