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

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

Issue 1032573002: Don't show "requires Chrome restart" when toggling stats reporting on Mac OS X (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review feedback Created 5 years, 9 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 | « chrome/browser/resources/options/browser_options.html ('k') | no next file » | 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 8ba30db451adb4a6e9fa9894aecb30507daa4993..aeb2c34a339cace86d7e16d645fb51e4d22ea317 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -462,20 +462,21 @@ cr.define('options', function() {
restartElements[1].onclick = function(event) {
chrome.send('restartBrowser');
};
- // Attach the listener for updating the checkbox and restart button.
- var updateMetricsRestartButton = function() {
- $('metrics-reporting-reset-restart').hidden =
- loadTimeData.getBoolean('metricsReportingEnabledAtStart') ==
- $('metrics-reporting-enabled').checked;
- };
$('metrics-reporting-enabled').onclick = function(event) {
chrome.send('metricsReportingCheckboxChanged',
[Boolean(event.currentTarget.checked)]);
- updateMetricsRestartButton();
+ if (cr.isMac) {
+ // A browser restart is never needed to toggle metrics reporting,
+ // and is only needed to toggle crash reporting when using Breakpad.
+ // Crashpad, used on Mac, does not require a browser restart.
+ return;
+ }
+ $('metrics-reporting-reset-restart').hidden =
+ loadTimeData.getBoolean('metricsReportingEnabledAtStart') ==
+ $('metrics-reporting-enabled').checked;
};
$('metrics-reporting-enabled').checked =
loadTimeData.getBoolean('metricsReportingEnabledAtStart');
- updateMetricsRestartButton();
}
// 'rappor-setting' element is only present on Chrome branded builds.
if ($('rappor-setting')) {
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698