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

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

Issue 2468173004: MD Settings: show restart button when user toggles metrics reporting (Closed)
Patch Set: 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
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 e2f2c045052fb973d4c9ea81ab5a3f295c55a787..90c43ba1c4115c99d95cb79f505c390d0ba707da 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.js
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js
@@ -35,6 +35,8 @@ Polymer({
<if expr="_google_chrome and not chromeos">
/** @type {MetricsReporting} */
dpapad 2016/11/03 01:32:38 ?MetricsReporting
Dan Beam 2016/11/03 01:38:32 this isn't initially null, it's undefined /** @ty
metricsReporting_: Object,
+
+ showRestart_: Boolean,
</if>
/** @private */
@@ -114,8 +116,17 @@ Polymer({
* @private
*/
setMetricsReporting_: function(metricsReporting) {
+ if (this.metricsReporting_) {
+ // TODO(dbeam): hide if changed back to the value Chrome started with.
dpapad 2016/11/03 01:32:38 Eh, is that too hard to do now? Just need an extra
Dan Beam 2016/11/03 01:38:32 to do correctly, we need to do this on chrome star
+ this.showRestart_ = true;
+ }
this.metricsReporting_ = metricsReporting;
},
+
+ /** @private */
+ onRestartTap_: function() {
+ settings.LifetimeBrowserProxyImpl.getInstance().restart();
+ },
</if>
<if expr="_google_chrome">

Powered by Google App Engine
This is Rietveld 408576698