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

Side by Side 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: . 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 var ArrayDataModel = cr.ui.ArrayDataModel; 7 var ArrayDataModel = cr.ui.ArrayDataModel;
8 var RepeatingButton = cr.ui.RepeatingButton; 8 var RepeatingButton = cr.ui.RepeatingButton;
9 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; 9 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator;
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // If the link was focused (i.e., it was activated using the keyboard) 93 // If the link was focused (i.e., it was activated using the keyboard)
94 // and it was used to show the section (rather than hiding it), focus 94 // and it was used to show the section (rather than hiding it), focus
95 // the first element in the container. 95 // the first element in the container.
96 if (document.activeElement === $('advanced-settings-expander') && 96 if (document.activeElement === $('advanced-settings-expander') &&
97 $('advanced-settings').style.height === '') { 97 $('advanced-settings').style.height === '') {
98 var focusElement = $('advanced-settings-container').querySelector( 98 var focusElement = $('advanced-settings-container').querySelector(
99 'button, input, list, select, a[href]'); 99 'button, input, list, select, a[href]');
100 if (focusElement) 100 if (focusElement)
101 focusElement.focus(); 101 focusElement.focus();
102 } 102 }
103
104 chrome.send('coreOptionsUserMetricsAction',
105 ['Options_ShowAdvancedSettings']);
michaelpg 2014/06/13 23:15:43 Worth noting that this count will report up to 2x
stevenjb 2014/06/16 21:58:10 Done.
103 }; 106 };
104 } else { 107 } else {
105 $('advanced-settings-expander').hidden = true; 108 $('advanced-settings-expander').hidden = true;
106 $('advanced-settings').hidden = true; 109 $('advanced-settings').hidden = true;
107 } 110 }
108 111
109 $('advanced-settings').addEventListener('webkitTransitionEnd', 112 $('advanced-settings').addEventListener('webkitTransitionEnd',
110 this.updateAdvancedSettingsExpander_.bind(this)); 113 this.updateAdvancedSettingsExpander_.bind(this));
111 114
112 if (cr.isChromeOS) { 115 if (cr.isChromeOS) {
(...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 BrowserOptions.getLoggedInUsername = function() { 1848 BrowserOptions.getLoggedInUsername = function() {
1846 return BrowserOptions.getInstance().username_; 1849 return BrowserOptions.getInstance().username_;
1847 }; 1850 };
1848 } 1851 }
1849 1852
1850 // Export 1853 // Export
1851 return { 1854 return {
1852 BrowserOptions: BrowserOptions 1855 BrowserOptions: BrowserOptions
1853 }; 1856 };
1854 }); 1857 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698