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

Side by Side Diff: chrome/browser/resources/print_preview/data/user_info.js

Issue 233623003: Remember and restore the account last used destination is registered for. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Repository which stores information about the user. Events are dispatched 9 * Repository which stores information about the user. Events are dispatched
10 * when the information changes. 10 * when the information changes.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 /** 61 /**
62 * @return {!Array.<string>} Email addresses of the logged in users or 62 * @return {!Array.<string>} Email addresses of the logged in users or
63 * empty array if no user is logged in. 63 * empty array if no user is logged in.
64 */ 64 */
65 get users() { 65 get users() {
66 return this.users_; 66 return this.users_;
67 }, 67 },
68 68
69 /** 69 /**
70 * Sets logged in user accounts info. 70 * Sets logged in user accounts info.
71 * @param {string} user Currently logged in user (email). 71 * @param {string} activeUser Active user account (email).
72 * @param {!Array.<string>} users List of currently logged in accounts. 72 * @param {!Array.<string>} users List of currently logged in accounts.
73 */ 73 */
74 setUsers: function(activeUser, users) { 74 setUsers: function(activeUser, users) {
75 this.activeUser_ = activeUser; 75 this.activeUser_ = activeUser;
76 this.users_ = users || []; 76 this.users_ = users || [];
77 cr.dispatchSimpleEvent(this, UserInfo.EventType.USERS_CHANGED); 77 cr.dispatchSimpleEvent(this, UserInfo.EventType.USERS_CHANGED);
78 }, 78 },
79 }; 79 };
80 80
81 return { 81 return {
82 UserInfo: UserInfo 82 UserInfo: UserInfo
83 }; 83 };
84 }); 84 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698