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

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: Adopt logging for URLReqest-based dict fetcher + cosmetics 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 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 base::DictionaryValue* dict = new base::DictionaryValue(); 121 base::DictionaryValue* dict = new base::DictionaryValue();
122 122
123 #define NET_ERROR(label, value) \ 123 #define NET_ERROR(label, value) \
124 dict->SetInteger(ErrorToShortString(value), static_cast<int>(value)); 124 dict->SetInteger(ErrorToShortString(value), static_cast<int>(value));
125 #include "net/base/net_error_list.h" 125 #include "net/base/net_error_list.h"
126 #undef NET_ERROR 126 #undef NET_ERROR
127 127
128 constants_dict->Set("netError", dict); 128 constants_dict->Set("netError", dict);
129 } 129 }
130 130
131 // Add information on the relationship between SDCH problem codes and their
132 // symbolic names.
133 {
134 base::DictionaryValue* dict = new base::DictionaryValue();
135
136 #define SDCH_PROBLEM_CODE(label, value) \
137 dict->SetInteger(#label, static_cast<int>(value));
138 #include "net/base/sdch_problem_code_list.h"
139 #undef SDCH_PROBLEM_CODE
140
141 constants_dict->Set("sdchProblemCode", dict);
142 }
143
131 // Add information on the relationship between QUIC error codes and their 144 // Add information on the relationship between QUIC error codes and their
132 // symbolic names. 145 // symbolic names.
133 { 146 {
134 base::DictionaryValue* dict = new base::DictionaryValue(); 147 base::DictionaryValue* dict = new base::DictionaryValue();
135 148
136 for (net::QuicErrorCode error = net::QUIC_NO_ERROR; 149 for (net::QuicErrorCode error = net::QUIC_NO_ERROR;
137 error < net::QUIC_LAST_ERROR; 150 error < net::QUIC_LAST_ERROR;
138 error = static_cast<net::QuicErrorCode>(error + 1)) { 151 error = static_cast<net::QuicErrorCode>(error + 1)) {
139 dict->SetInteger(net::QuicUtils::ErrorToString(error), 152 dict->SetInteger(net::QuicUtils::ErrorToString(error),
140 static_cast<int>(error)); 153 static_cast<int>(error));
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 240 }
228 241
229 // "clientInfo" key is required for some NetLogLogger log readers. 242 // "clientInfo" key is required for some NetLogLogger log readers.
230 // Provide a default empty value for compatibility. 243 // Provide a default empty value for compatibility.
231 constants_dict->Set("clientInfo", new base::DictionaryValue()); 244 constants_dict->Set("clientInfo", new base::DictionaryValue());
232 245
233 return constants_dict; 246 return constants_dict;
234 } 247 }
235 248
236 } // namespace net 249 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698