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

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

Issue 423813002: Sdch view for net-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes. Lots. Created 6 years, 3 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/net_internals/main.js
diff --git a/chrome/browser/resources/net_internals/main.js b/chrome/browser/resources/net_internals/main.js
index 05e9e7b9bac56b43a149f9b5e771fc14542a312c..02dd9ccbcf27434fe06d987129feaf9a2eca77a3 100644
--- a/chrome/browser/resources/net_internals/main.js
+++ b/chrome/browser/resources/net_internals/main.js
@@ -192,6 +192,7 @@ var MainView = (function() {
addTab(SocketsView);
addTab(SpdyView);
addTab(QuicView);
+ addTab(SdchView);
addTab(HttpCacheView);
addTab(ModulesView);
addTab(TestView);
@@ -311,6 +312,7 @@ ConstantsObserver.prototype.onReceivedConstants = function(receivedConstants) {
QuicRstStreamError = Constants.quicRstStreamError;
AddressFamily = Constants.addressFamily;
LoadState = Constants.loadState;
+ SdchProblemCode = Constants.sdchProblemCode;
mmenke 2014/10/03 18:59:26 Should declare this up with the others (Not curren
baranovich 2014/10/27 20:49:24 Matt, not quite sure if I got what you mean. I gue
mmenke 2014/10/27 21:29:34 This is where they're initialized, but not where t
baranovich 2014/10/27 21:52:16 Done. Ah, thanks, my bad(
// certStatusFlag may not be present when loading old log Files
if (typeof(Constants.certStatusFlag) == 'object')
CertStatusFlag = Constants.certStatusFlag;
@@ -386,3 +388,15 @@ function addressFamilyToString(family) {
// Strip that prefix since it is redundant and only clutters the output.
return str.replace(/^ADDRESS_FAMILY_/, '');
}
+
+/**
+ * Returns the name for sdchProblemCode.
+ *
+ * Example: sdchProblemCodeToString(5) should return
+ * "DECODE_BODY_ERROR".
+ * @param {number} sdchProblemCode The SDCH problem code.
+ * @return {string} The name of the given problem code.
+ */
+function sdchProblemCodeToString(sdchProblemCode) {
+ return getKeyWithValue(SdchProblemCode, sdchProblemCode);
+}

Powered by Google App Engine
This is Rietveld 408576698