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

Unified Diff: chrome/browser/resources/net_internals/browser_bridge.js

Issue 775773002: Add data reduction proxy debug info to net-internals#bandwidth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/net_internals/browser_bridge.js
diff --git a/chrome/browser/resources/net_internals/browser_bridge.js b/chrome/browser/resources/net_internals/browser_bridge.js
index 8a90b98cf55839fc6962e442b5af469f09d10451..2cf2878a1a7c52e26c67389e158566c27d41a49a 100644
--- a/chrome/browser/resources/net_internals/browser_bridge.js
+++ b/chrome/browser/resources/net_internals/browser_bridge.js
@@ -79,6 +79,9 @@ var BrowserBridge = (function() {
new PollableDataHelper('onSystemLogChanged',
this.getSystemLog.bind(this, 'syslog'));
}
+ this.pollableDataHelpers_.dataReductionProxyInfo =
+ new PollableDataHelper('onDataReductionProxyInfoChanged',
+ this.sendGetDataReductionProxyInfo.bind(this));
mmenke 2014/12/05 16:18:25 Could you move this just below "onExtensionInfoCha
jeremyim 2014/12/05 21:31:12 Done.
// Setting this to true will cause messages from the browser to be ignored,
// and no messages will be sent to the browser, either. Intended for use
@@ -237,6 +240,11 @@ var BrowserBridge = (function() {
this.send('setNetworkDebugMode', [subsystem]);
},
+ sendGetDataReductionProxyInfo: function() {
+ this.send('getDataReductionProxyInfo');
+ },
+
+
mmenke 2014/12/05 16:18:25 nit: Remove extra blank line.
jeremyim 2014/12/05 21:31:12 Done.
//--------------------------------------------------------------------------
// Messages received from the browser.
//--------------------------------------------------------------------------
@@ -358,6 +366,11 @@ var BrowserBridge = (function() {
this.pollableDataHelpers_.systemLog.update(systemLog);
},
+ receivedDataReductionProxyInfo: function(dataReductionProxyInfo) {
+ this.pollableDataHelpers_.dataReductionProxyInfo.update(
+ dataReductionProxyInfo);
+ },
+
//--------------------------------------------------------------------------
/**
@@ -547,6 +560,17 @@ var BrowserBridge = (function() {
},
/**
+ * Adds a listener of the data reduction proxy info. |observer| will be
+ * called back when data is received, through:
+ *
+ * observer.onDataReductionProxyInfoChanged(dataReductionProxyInfo)
+ */
+ addDataReductionProxyInfoObserver: function(observer, ignoreWhenUnchanged) {
+ this.pollableDataHelpers_.dataReductionProxyInfo.addObserver(
+ observer, ignoreWhenUnchanged);
+ },
+
+ /**
* Adds a listener for the results of HSTS (HTTPS Strict Transport Security)
* queries. The observer will be called back with:
*

Powered by Google App Engine
This is Rietveld 408576698