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

Unified Diff: chrome/browser/resources/settings/privacy_page/privacy_page.js

Issue 2494813002: MD Settings: slight tweaks to when the metrics reporting restart button shows up (Closed)
Patch Set: fixes Created 4 years, 1 month 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/test/data/webui/settings/metrics_reporting_tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/privacy_page/privacy_page.js
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.js b/chrome/browser/resources/settings/privacy_page/privacy_page.js
index bc34e0928ceaaf49229478fc1d3c264a1d1ff10c..ddc1ef50fd25f360c0158a95c25594649465ef5d 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.js
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js
@@ -127,10 +127,13 @@ Polymer({
* @private
*/
setMetricsReporting_: function(metricsReporting) {
- if (this.metricsReporting_) {
- // TODO(dbeam): hide if changed back to the value Chrome started with.
- var changed = this.metricsReporting_.enabled != metricsReporting.enabled;
- this.showRestart_ = changed && !this.metricsReporting_.managed;
+ // TODO(dbeam): remember whether metrics reporting was enabled when Chrome
+ // started.
+ if (metricsReporting.managed) {
+ this.showRestart_ = false;
+ } else if (this.metricsReporting_ &&
+ metricsReporting.enabled != this.metricsReporting_.enabled) {
+ this.showRestart_ = true;
}
this.metricsReporting_ = metricsReporting;
},
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/metrics_reporting_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698