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

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

Issue 11696010: Integrate QUIC info into net-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 7 years, 12 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 | « no previous file | chrome/browser/resources/net_internals/category_tabs.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d86aae0afc98b35a0e7ba5796f56010f307f32f3..f0fa6e4c06e4db60470413ce00fb3b1ca6180253 100644
--- a/chrome/browser/resources/net_internals/browser_bridge.js
+++ b/chrome/browser/resources/net_internals/browser_bridge.js
@@ -54,6 +54,9 @@ var BrowserBridge = (function() {
this.pollableDataHelpers_.historicNetworkStats =
new PollableDataHelper('onHistoricNetworkStatsChanged',
this.sendGetHistoricNetworkStats.bind(this));
+ this.pollableDataHelpers_.quicInfo =
+ new PollableDataHelper('onQuicInfoChanged',
+ this.sendGetQuicInfo.bind(this));
this.pollableDataHelpers_.spdySessionInfo =
new PollableDataHelper('onSpdySessionInfoChanged',
this.sendGetSpdySessionInfo.bind(this));
@@ -212,6 +215,10 @@ var BrowserBridge = (function() {
this.send('flushSocketPools');
},
+ sendGetQuicInfo: function() {
+ this.send('getQuicInfo');
+ },
+
sendGetSpdySessionInfo: function() {
this.send('getSpdySessionInfo');
},
@@ -327,6 +334,10 @@ var BrowserBridge = (function() {
historicNetworkStats);
},
+ receivedQuicInfo: function(quicInfo) {
+ this.pollableDataHelpers_.quicInfo.update(quicInfo);
+ },
+
receivedSpdySessionInfo: function(spdySessionInfo) {
this.pollableDataHelpers_.spdySessionInfo.update(spdySessionInfo);
},
@@ -505,6 +516,17 @@ var BrowserBridge = (function() {
},
/**
+ * Adds a listener of the QUIC info. |observer| will be called back
+ * when data is received, through:
+ *
+ * observer.onQuicInfoChanged(quicInfo)
+ */
+ addQuicInfoObserver: function(observer, ignoreWhenUnchanged) {
+ this.pollableDataHelpers_.quicInfo.addObserver(
+ observer, ignoreWhenUnchanged);
+ },
+
+ /**
* Adds a listener of the SPDY info. |observer| will be called back
* when data is received, through:
*
« no previous file with comments | « no previous file | chrome/browser/resources/net_internals/category_tabs.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698