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

Unified Diff: chrome/browser/resources/options/browser_options.js

Issue 335953002: Add UMA stats for user settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/options/chromeos/accounts_options.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index 6ffef8c6e86f82fdd621fa2d441d1041935c966f..dc1302d49524cf12bc9009f50c5ecfac7dd1864e 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -86,6 +86,12 @@ cr.define('options', function() {
if (loadTimeData.getBoolean('allowAdvancedSettings')) {
$('advanced-settings-expander').onclick = function() {
+ var showAdvanced =
+ BrowserOptions.shouldShowSection_($('advanced-settings'));
+ if (showAdvanced) {
+ chrome.send('coreOptionsUserMetricsAction',
+ ['Options_ShowAdvancedSettings']);
+ }
self.toggleSectionWithAnimation_(
$('advanced-settings'),
$('advanced-settings-container'));
@@ -94,7 +100,7 @@ cr.define('options', function() {
// and it was used to show the section (rather than hiding it), focus
// the first element in the container.
if (document.activeElement === $('advanced-settings-expander') &&
- $('advanced-settings').style.height === '') {
+ showAdvanced) {
var focusElement = $('advanced-settings-container').querySelector(
'button, input, list, select, a[href]');
if (focusElement)
« no previous file with comments | « no previous file | chrome/browser/resources/options/chromeos/accounts_options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698