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

Unified Diff: net/base/net_log_logger.cc

Issue 423813002: Sdch view for net-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Declare SdchProblemCode Created 6 years, 2 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: net/base/net_log_logger.cc
diff --git a/net/base/net_log_logger.cc b/net/base/net_log_logger.cc
index 99e769b27e0229ea944f663977e3c50e96e12645..67ba62da3c988a39b3e709a228f1cf61ee4ca0db 100644
--- a/net/base/net_log_logger.cc
+++ b/net/base/net_log_logger.cc
@@ -49,6 +49,14 @@ const short kNetErrors[] = {
#undef NET_ERROR
};
+const StringToConstant kSdchProblems[] = {
+#define SDCH_PROBLEM_CODE(label, value) \
+ { #label, value } \
+ ,
+#include "net/base/sdch_problem_code_list.h"
+#undef SDCH_PROBLEM_CODE
+};
+
} // namespace
namespace net {
@@ -157,6 +165,17 @@ base::DictionaryValue* NetLogLogger::GetConstants() {
constants_dict->Set("netError", dict);
}
+ // Add information on the relationship between SDCH problem codes and their
+ // symbolic names.
+ {
+ base::DictionaryValue* dict = new base::DictionaryValue();
+
+ for (size_t i = 0; i < arraysize(kSdchProblems); i++)
+ dict->SetInteger(kSdchProblems[i].name, kSdchProblems[i].constant);
+
+ constants_dict->Set("sdchProblemCode", dict);
+ }
+
// Add information on the relationship between QUIC error codes and their
// symbolic names.
{

Powered by Google App Engine
This is Rietveld 408576698