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

Side by Side Diff: net/spdy/spdy_session.cc

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 20 matching lines...) Expand all
31 #include "net/base/proxy_delegate.h" 31 #include "net/base/proxy_delegate.h"
32 #include "net/cert/asn1_util.h" 32 #include "net/cert/asn1_util.h"
33 #include "net/cert/cert_verify_result.h" 33 #include "net/cert/cert_verify_result.h"
34 #include "net/cert/ct_policy_status.h" 34 #include "net/cert/ct_policy_status.h"
35 #include "net/http/http_log_util.h" 35 #include "net/http/http_log_util.h"
36 #include "net/http/http_network_session.h" 36 #include "net/http/http_network_session.h"
37 #include "net/http/http_server_properties.h" 37 #include "net/http/http_server_properties.h"
38 #include "net/http/http_util.h" 38 #include "net/http/http_util.h"
39 #include "net/http/transport_security_state.h" 39 #include "net/http/transport_security_state.h"
40 #include "net/log/net_log.h" 40 #include "net/log/net_log.h"
41 #include "net/log/net_log_capture_mode.h"
41 #include "net/log/net_log_event_type.h" 42 #include "net/log/net_log_event_type.h"
43 #include "net/log/net_log_source.h"
42 #include "net/log/net_log_source_type.h" 44 #include "net/log/net_log_source_type.h"
45 #include "net/log/net_log_with_source.h"
43 #include "net/proxy/proxy_server.h" 46 #include "net/proxy/proxy_server.h"
44 #include "net/socket/ssl_client_socket.h" 47 #include "net/socket/ssl_client_socket.h"
45 #include "net/spdy/spdy_buffer_producer.h" 48 #include "net/spdy/spdy_buffer_producer.h"
46 #include "net/spdy/spdy_frame_builder.h" 49 #include "net/spdy/spdy_frame_builder.h"
47 #include "net/spdy/spdy_http_utils.h" 50 #include "net/spdy/spdy_http_utils.h"
48 #include "net/spdy/spdy_protocol.h" 51 #include "net/spdy/spdy_protocol.h"
49 #include "net/spdy/spdy_session_pool.h" 52 #include "net/spdy/spdy_session_pool.h"
50 #include "net/spdy/spdy_stream.h" 53 #include "net/spdy/spdy_stream.h"
51 #include "net/ssl/channel_id_service.h" 54 #include "net/ssl/channel_id_service.h"
52 #include "net/ssl/ssl_cipher_suite_names.h" 55 #include "net/ssl/ssl_cipher_suite_names.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 std::unique_ptr<base::Value> NetLogSpdySessionCallback( 113 std::unique_ptr<base::Value> NetLogSpdySessionCallback(
111 const HostPortProxyPair* host_pair, 114 const HostPortProxyPair* host_pair,
112 NetLogCaptureMode /* capture_mode */) { 115 NetLogCaptureMode /* capture_mode */) {
113 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 116 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
114 dict->SetString("host", host_pair->first.ToString()); 117 dict->SetString("host", host_pair->first.ToString());
115 dict->SetString("proxy", host_pair->second.ToPacString()); 118 dict->SetString("proxy", host_pair->second.ToPacString());
116 return std::move(dict); 119 return std::move(dict);
117 } 120 }
118 121
119 std::unique_ptr<base::Value> NetLogSpdyInitializedCallback( 122 std::unique_ptr<base::Value> NetLogSpdyInitializedCallback(
120 NetLog::Source source, 123 NetLogSource source,
121 NetLogCaptureMode /* capture_mode */) { 124 NetLogCaptureMode /* capture_mode */) {
122 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 125 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
123 if (source.IsValid()) { 126 if (source.IsValid()) {
124 source.AddToEventParameters(dict.get()); 127 source.AddToEventParameters(dict.get());
125 } 128 }
126 dict->SetString("protocol", SSLClientSocket::NextProtoToString(kProtoHTTP2)); 129 dict->SetString("protocol", SSLClientSocket::NextProtoToString(kProtoHTTP2));
127 return std::move(dict); 130 return std::move(dict);
128 } 131 }
129 132
130 std::unique_ptr<base::Value> NetLogSpdySettingsCallback( 133 std::unique_ptr<base::Value> NetLogSpdySettingsCallback(
(...skipping 2973 matching lines...) Expand 10 before | Expand all | Expand 10 after
3104 if (!queue->empty()) { 3107 if (!queue->empty()) {
3105 SpdyStreamId stream_id = queue->front(); 3108 SpdyStreamId stream_id = queue->front();
3106 queue->pop_front(); 3109 queue->pop_front();
3107 return stream_id; 3110 return stream_id;
3108 } 3111 }
3109 } 3112 }
3110 return 0; 3113 return 0;
3111 } 3114 }
3112 3115
3113 } // namespace net 3116 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698