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

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

Issue 2233443002: MD Settings: implement metrics reporting checkbox on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@desktop-uma
Patch Set: remove 2 using Created 4 years, 4 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
Index: chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.js
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.js b/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.js
index 98d9e50743613961efe432dc884855fad35f39f6..549759123158652d365a7cc5d21013c90414086d 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.js
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.js
@@ -4,13 +4,26 @@
/** @fileoverview Handles interprocess communcation for the privacy page. */
+/** @typedef {{enabled: boolean, managed: boolean}} */
+var MetricsReporting;
+
cr.define('settings', function() {
/** @interface */
function PrivacyPageBrowserProxy() {}
PrivacyPageBrowserProxy.prototype = {
+<if expr="_google_chrome and not chromeos">
+ /** @return {!Promise<!MetricsReporting>} */
+ getMetricsReporting: assertNotReached,
+
+ /** @param {boolean} enabled */
+ setMetricsReportingEnabled: assertNotReached,
+</if>
+
+<if expr="is_win or is_macosx">
/** Invokes the native certificate manager (used by win and mac). */
showManageSSLCertificates: function() {},
+</if>
};
/**
@@ -21,10 +34,24 @@ cr.define('settings', function() {
cr.addSingletonGetter(PrivacyPageBrowserProxyImpl);
PrivacyPageBrowserProxyImpl.prototype = {
+<if expr="_google_chrome and not chromeos">
+ /** @override */
+ getMetricsReporting: function() {
+ return cr.sendWithPromise('getMetricsReporting');
+ },
+
+ /** @override */
+ setMetricsReportingEnabled: function(enabled) {
+ chrome.send('setMetricsReportingEnabled', [enabled]);
+ },
+</if>
+
+<if expr="is_win or is_macosx">
/** @override */
showManageSSLCertificates: function() {
chrome.send('showManageSSLCertificates');
},
+</if>
};
return {

Powered by Google App Engine
This is Rietveld 408576698