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

Side by Side 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: Change comments and netlog field name Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/net_log_logger.h" 5 #include "net/base/net_log_logger.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 base::DictionaryValue* dict = new base::DictionaryValue(); 120 base::DictionaryValue* dict = new base::DictionaryValue();
121 121
122 #define NET_ERROR(label, value) \ 122 #define NET_ERROR(label, value) \
123 dict->SetInteger(# label, static_cast<int>(value)); 123 dict->SetInteger(# label, static_cast<int>(value));
124 #include "net/base/net_error_list.h" 124 #include "net/base/net_error_list.h"
125 #undef NET_ERROR 125 #undef NET_ERROR
126 126
127 constants_dict->Set("netError", dict); 127 constants_dict->Set("netError", dict);
128 } 128 }
129 129
130 // Add information on the relationship between SDCH problem codes and their
131 // symbolic names.
132 {
133 base::DictionaryValue* dict = new base::DictionaryValue();
134
135 #define SDCH_PROBLEM_CODE(label, value) \
136 dict->SetInteger(#label, static_cast<int>(value));
137 #include "net/base/sdch_problem_code_list.h"
138 #undef SDCH_PROBLEM_CODE
139
140 constants_dict->Set("sdchProblemCode", dict);
141 }
142
130 // Add information on the relationship between QUIC error codes and their 143 // Add information on the relationship between QUIC error codes and their
131 // symbolic names. 144 // symbolic names.
132 { 145 {
133 base::DictionaryValue* dict = new base::DictionaryValue(); 146 base::DictionaryValue* dict = new base::DictionaryValue();
134 147
135 for (net::QuicErrorCode error = net::QUIC_NO_ERROR; 148 for (net::QuicErrorCode error = net::QUIC_NO_ERROR;
136 error < net::QUIC_LAST_ERROR; 149 error < net::QUIC_LAST_ERROR;
137 error = static_cast<net::QuicErrorCode>(error + 1)) { 150 error = static_cast<net::QuicErrorCode>(error + 1)) {
138 dict->SetInteger(net::QuicUtils::ErrorToString(error), 151 dict->SetInteger(net::QuicUtils::ErrorToString(error),
139 static_cast<int>(error)); 152 static_cast<int>(error));
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 239 }
227 240
228 // "clientInfo" key is required for some NetLogLogger log readers. 241 // "clientInfo" key is required for some NetLogLogger log readers.
229 // Provide a default empty value for compatibility. 242 // Provide a default empty value for compatibility.
230 constants_dict->Set("clientInfo", new base::DictionaryValue()); 243 constants_dict->Set("clientInfo", new base::DictionaryValue());
231 244
232 return constants_dict; 245 return constants_dict;
233 } 246 }
234 247
235 } // namespace net 248 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698