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

Side by Side Diff: net/log/net_log_util.cc

Issue 2516033003: Landing Recent QUIC changes until Mon Nov 14 04:43:50 2016 +0000 (Closed)
Patch Set: Remove unused UpdatePacketGapSentHistogram() function. Created 4 years, 1 month 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
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/net.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/log/net_log_util.h" 5 #include "net/log/net_log_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 19 matching lines...) Expand all
30 #include "net/http/http_transaction_factory.h" 30 #include "net/http/http_transaction_factory.h"
31 #include "net/log/net_log.h" 31 #include "net/log/net_log.h"
32 #include "net/log/net_log_capture_mode.h" 32 #include "net/log/net_log_capture_mode.h"
33 #include "net/log/net_log_entry.h" 33 #include "net/log/net_log_entry.h"
34 #include "net/log/net_log_event_type.h" 34 #include "net/log/net_log_event_type.h"
35 #include "net/log/net_log_parameters_callback.h" 35 #include "net/log/net_log_parameters_callback.h"
36 #include "net/log/net_log_with_source.h" 36 #include "net/log/net_log_with_source.h"
37 #include "net/proxy/proxy_config.h" 37 #include "net/proxy/proxy_config.h"
38 #include "net/proxy/proxy_retry_info.h" 38 #include "net/proxy/proxy_retry_info.h"
39 #include "net/proxy/proxy_service.h" 39 #include "net/proxy/proxy_service.h"
40 #include "net/quic/core/quic_error_codes.h"
40 #include "net/quic/core/quic_protocol.h" 41 #include "net/quic/core/quic_protocol.h"
41 #include "net/quic/core/quic_utils.h" 42 #include "net/socket/ssl_client_socket.h"
42 #include "net/socket/next_proto.h"
43 #include "net/url_request/url_request.h" 43 #include "net/url_request/url_request.h"
44 #include "net/url_request/url_request_context.h" 44 #include "net/url_request/url_request_context.h"
45 45
46 namespace net { 46 namespace net {
47 47
48 namespace { 48 namespace {
49 49
50 // This should be incremented when significant changes are made that will 50 // This should be incremented when significant changes are made that will
51 // invalidate the old loading code. 51 // invalidate the old loading code.
52 const int kLogFormatVersion = 1; 52 const int kLogFormatVersion = 1;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 constants_dict->Set("netError", std::move(dict)); 206 constants_dict->Set("netError", std::move(dict));
207 } 207 }
208 208
209 // Add information on the relationship between QUIC error codes and their 209 // Add information on the relationship between QUIC error codes and their
210 // symbolic names. 210 // symbolic names.
211 { 211 {
212 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 212 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
213 213
214 for (QuicErrorCode error = QUIC_NO_ERROR; error < QUIC_LAST_ERROR; 214 for (QuicErrorCode error = QUIC_NO_ERROR; error < QUIC_LAST_ERROR;
215 error = static_cast<QuicErrorCode>(error + 1)) { 215 error = static_cast<QuicErrorCode>(error + 1)) {
216 dict->SetInteger(QuicUtils::ErrorToString(error), 216 dict->SetInteger(QuicErrorCodeToString(error), static_cast<int>(error));
217 static_cast<int>(error));
218 } 217 }
219 218
220 constants_dict->Set("quicError", std::move(dict)); 219 constants_dict->Set("quicError", std::move(dict));
221 } 220 }
222 221
223 // Add information on the relationship between QUIC RST_STREAM error codes 222 // Add information on the relationship between QUIC RST_STREAM error codes
224 // and their symbolic names. 223 // and their symbolic names.
225 { 224 {
226 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 225 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
227 226
228 for (QuicRstStreamErrorCode error = QUIC_STREAM_NO_ERROR; 227 for (QuicRstStreamErrorCode error = QUIC_STREAM_NO_ERROR;
229 error < QUIC_STREAM_LAST_ERROR; 228 error < QUIC_STREAM_LAST_ERROR;
230 error = static_cast<QuicRstStreamErrorCode>(error + 1)) { 229 error = static_cast<QuicRstStreamErrorCode>(error + 1)) {
231 dict->SetInteger(QuicUtils::StreamErrorToString(error), 230 dict->SetInteger(QuicRstStreamErrorCodeToString(error),
232 static_cast<int>(error)); 231 static_cast<int>(error));
233 } 232 }
234 233
235 constants_dict->Set("quicRstStreamError", std::move(dict)); 234 constants_dict->Set("quicRstStreamError", std::move(dict));
236 } 235 }
237 236
238 // Add information on the relationship between SDCH problem codes and their 237 // Add information on the relationship between SDCH problem codes and their
239 // symbolic names. 238 // symbolic names.
240 { 239 {
241 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 240 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 // fine, since GetRequestStateAsValue() ignores the capture mode. 529 // fine, since GetRequestStateAsValue() ignores the capture mode.
531 NetLogEntryData entry_data( 530 NetLogEntryData entry_data(
532 NetLogEventType::REQUEST_ALIVE, request->net_log().source(), 531 NetLogEventType::REQUEST_ALIVE, request->net_log().source(),
533 NetLogEventPhase::BEGIN, request->creation_time(), &callback); 532 NetLogEventPhase::BEGIN, request->creation_time(), &callback);
534 NetLogEntry entry(&entry_data, NetLogCaptureMode::Default()); 533 NetLogEntry entry(&entry_data, NetLogCaptureMode::Default());
535 observer->OnAddEntry(entry); 534 observer->OnAddEntry(entry);
536 } 535 }
537 } 536 }
538 537
539 } // namespace net 538 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698