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

Side by Side Diff: chrome/browser/resources/options/chromeos/accounts_options.js

Issue 335953002: Add UMA stats for user settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 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 7
8 ///////////////////////////////////////////////////////////////////////////// 8 /////////////////////////////////////////////////////////////////////////////
9 // AccountsOptions class: 9 // AccountsOptions class:
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 this.updateControls_(); 110 this.updateControls_();
111 }, 111 },
112 112
113 /** 113 /**
114 * Handler for "add" event fired from userNameEdit. 114 * Handler for "add" event fired from userNameEdit.
115 * @private 115 * @private
116 * @param {Event} e Add event fired from userNameEdit. 116 * @param {Event} e Add event fired from userNameEdit.
117 */ 117 */
118 handleAddUser_: function(e) { 118 handleAddUser_: function(e) {
119 chrome.send('whitelistUser', [e.user.email, e.user.name]); 119 chrome.send('whitelistUser', [e.user.email, e.user.name]);
120 chrome.send('coreOptionsUserMetricsAction',
121 ['Options_AddWhitelistedUser']);
michaelpg 2014/06/13 23:15:43 Options_WhitelistedUser_Add? (parity with Bookmark
stevenjb 2014/06/16 21:58:10 Done.
120 }, 122 },
121 123
122 /** 124 /**
123 * Handler for "remove" event fired from userList. 125 * Handler for "remove" event fired from userList.
124 * @private 126 * @private
125 * @param {Event} e Remove event fired from userList. 127 * @param {Event} e Remove event fired from userList.
126 */ 128 */
127 handleRemoveUser_: function(e) { 129 handleRemoveUser_: function(e) {
128 chrome.send('unwhitelistUser', [e.user.username]); 130 chrome.send('unwhitelistUser', [e.user.username]);
131 chrome.send('coreOptionsUserMetricsAction',
132 ['Options_RemoveWhitelistedUser']);
michaelpg 2014/06/13 23:15:43 Options_WhitelistedUser_Remove? (parity with Bookm
stevenjb 2014/06/16 21:58:10 Done.
129 } 133 }
130 }; 134 };
131 135
132 136
133 /** 137 /**
134 * Returns whether the whitelist is managed by policy or not. 138 * Returns whether the whitelist is managed by policy or not.
135 */ 139 */
136 AccountsOptions.whitelistIsManaged = function() { 140 AccountsOptions.whitelistIsManaged = function() {
137 return loadTimeData.getBoolean('whitelist_is_managed'); 141 return loadTimeData.getBoolean('whitelist_is_managed');
138 }; 142 };
139 143
140 /** 144 /**
141 * Update account picture. 145 * Update account picture.
142 * @param {string} username User for which to update the image. 146 * @param {string} username User for which to update the image.
143 */ 147 */
144 AccountsOptions.updateAccountPicture = function(username) { 148 AccountsOptions.updateAccountPicture = function(username) {
145 if (this.showWhitelist_) 149 if (this.showWhitelist_)
146 $('userList').updateAccountPicture(username); 150 $('userList').updateAccountPicture(username);
147 }; 151 };
148 152
149 // Export 153 // Export
150 return { 154 return {
151 AccountsOptions: AccountsOptions 155 AccountsOptions: AccountsOptions
152 }; 156 };
153 157
154 }); 158 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698