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

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

Issue 2339723002: Add Signin_Impression_FromSettings user action for Desktops (Closed)
Patch Set: format Created 4 years, 3 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
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.exportPath('options'); 5 cr.exportPath('options');
6 6
7 /** 7 /**
8 * @typedef {{actionLinkText: (string|undefined), 8 * @typedef {{actionLinkText: (string|undefined),
9 * childUser: (boolean|undefined), 9 * childUser: (boolean|undefined),
10 * hasError: (boolean|undefined), 10 * hasError: (boolean|undefined),
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 if (cr.isChromeOS) { 207 if (cr.isChromeOS) {
208 UIAccountTweaks.applyGuestSessionVisibility(document); 208 UIAccountTweaks.applyGuestSessionVisibility(document);
209 UIAccountTweaks.applyPublicSessionVisibility(document); 209 UIAccountTweaks.applyPublicSessionVisibility(document);
210 if (loadTimeData.getBoolean('secondaryUser')) 210 if (loadTimeData.getBoolean('secondaryUser'))
211 $('secondary-user-banner').hidden = false; 211 $('secondary-user-banner').hidden = false;
212 } 212 }
213 213
214 // Sync (Sign in) section. 214 // Sync (Sign in) section.
215 this.updateSyncState_(/** @type {options.SyncStatus} */( 215 this.updateSyncState_(/** @type {options.SyncStatus} */(
216 loadTimeData.getValue('syncData'))); 216 loadTimeData.getValue('syncData')));
217 if (!$('sync-overview').hidden) {
218 chrome.send('metricsHandler:recordAction',
219 ['Signin_Impression_FromSettings']);
220 }
217 221
218 $('start-stop-sync').onclick = function(event) { 222 $('start-stop-sync').onclick = function(event) {
219 if (self.signedIn_) { 223 if (self.signedIn_) {
220 if (self.signoutAllowed_) 224 if (self.signoutAllowed_)
221 SyncSetupOverlay.showStopSyncingUI(); 225 SyncSetupOverlay.showStopSyncingUI();
222 else 226 else
223 chrome.send('showDisconnectManagedProfileDialog'); 227 chrome.send('showDisconnectManagedProfileDialog');
224 } else if (cr.isChromeOS) { 228 } else if (cr.isChromeOS) {
225 SyncSetupOverlay.showSetupUI(); 229 SyncSetupOverlay.showSetupUI();
226 } else { 230 } else {
(...skipping 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 2415
2412 settings.hidden = !isVisible; 2416 settings.hidden = !isVisible;
2413 }; 2417 };
2414 } 2418 }
2415 2419
2416 // Export 2420 // Export
2417 return { 2421 return {
2418 BrowserOptions: BrowserOptions 2422 BrowserOptions: BrowserOptions
2419 }; 2423 };
2420 }); 2424 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698