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

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: Review fixes. Lots. 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 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // symbolic names. 147 // symbolic names.
148 { 148 {
149 base::DictionaryValue* dict = new base::DictionaryValue(); 149 base::DictionaryValue* dict = new base::DictionaryValue();
150 150
151 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kNetErrors); i++) 151 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kNetErrors); i++)
152 dict->SetInteger(ErrorToShortString(kNetErrors[i]), kNetErrors[i]); 152 dict->SetInteger(ErrorToShortString(kNetErrors[i]), kNetErrors[i]);
153 153
154 constants_dict->Set("netError", dict); 154 constants_dict->Set("netError", dict);
155 } 155 }
156 156
157 // Add information on the relationship between SDCH problem codes and their
158 // symbolic names.
159 {
160 base::DictionaryValue* dict = new base::DictionaryValue();
161
162 #define SDCH_PROBLEM_CODE(label, value) \
163 dict->SetInteger(#label, static_cast<int>(value));
mmenke 2014/10/03 18:59:27 nit: +2 indent.
baranovich 2014/10/27 20:49:24 Done.
164 #include "net/base/sdch_problem_code_list.h"
165 #undef SDCH_PROBLEM_CODE
mmenke 2014/10/03 18:59:27 The code in this file has been refactored to reduc
baranovich 2014/10/27 20:49:24 Done.
166
167 constants_dict->Set("sdchProblemCode", dict);
168 }
169
157 // Add information on the relationship between QUIC error codes and their 170 // Add information on the relationship between QUIC error codes and their
158 // symbolic names. 171 // symbolic names.
159 { 172 {
160 base::DictionaryValue* dict = new base::DictionaryValue(); 173 base::DictionaryValue* dict = new base::DictionaryValue();
161 174
162 for (net::QuicErrorCode error = net::QUIC_NO_ERROR; 175 for (net::QuicErrorCode error = net::QUIC_NO_ERROR;
163 error < net::QUIC_LAST_ERROR; 176 error < net::QUIC_LAST_ERROR;
164 error = static_cast<net::QuicErrorCode>(error + 1)) { 177 error = static_cast<net::QuicErrorCode>(error + 1)) {
165 dict->SetInteger(net::QuicUtils::ErrorToString(error), 178 dict->SetInteger(net::QuicUtils::ErrorToString(error),
166 static_cast<int>(error)); 179 static_cast<int>(error));
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 266 }
254 267
255 // "clientInfo" key is required for some NetLogLogger log readers. 268 // "clientInfo" key is required for some NetLogLogger log readers.
256 // Provide a default empty value for compatibility. 269 // Provide a default empty value for compatibility.
257 constants_dict->Set("clientInfo", new base::DictionaryValue()); 270 constants_dict->Set("clientInfo", new base::DictionaryValue());
258 271
259 return constants_dict; 272 return constants_dict;
260 } 273 }
261 274
262 } // namespace net 275 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698