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

Side by Side Diff: net/http/http_stream_factory_impl.h

Issue 2621983004: Improve HttpStreamFactory NetLog events (Closed)
Patch Set: Created 3 years, 11 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 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "net/base/host_port_pair.h" 17 #include "net/base/host_port_pair.h"
18 #include "net/base/net_export.h" 18 #include "net/base/net_export.h"
19 #include "net/base/request_priority.h" 19 #include "net/base/request_priority.h"
20 #include "net/http/http_stream_factory.h" 20 #include "net/http/http_stream_factory.h"
21 #include "net/log/net_log_with_source.h"
21 #include "net/proxy/proxy_server.h" 22 #include "net/proxy/proxy_server.h"
22 #include "net/socket/ssl_client_socket.h" 23 #include "net/socket/ssl_client_socket.h"
23 #include "net/spdy/spdy_session_key.h" 24 #include "net/spdy/spdy_session_key.h"
24 25
25 namespace net { 26 namespace net {
26 27
27 class HttpNetworkSession; 28 class HttpNetworkSession;
28 class ProxyInfo; 29 class ProxyInfo;
29 class SpdySession; 30 class SpdySession;
30 class NetLogWithSource; 31 class NetLogWithSource;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 109
109 // Called when a SpdySession is ready. It will find appropriate Requests and 110 // Called when a SpdySession is ready. It will find appropriate Requests and
110 // fulfill them. |direct| indicates whether or not |spdy_session| uses a 111 // fulfill them. |direct| indicates whether or not |spdy_session| uses a
111 // proxy. 112 // proxy.
112 void OnNewSpdySessionReady(const base::WeakPtr<SpdySession>& spdy_session, 113 void OnNewSpdySessionReady(const base::WeakPtr<SpdySession>& spdy_session,
113 bool direct, 114 bool direct,
114 const SSLConfig& used_ssl_config, 115 const SSLConfig& used_ssl_config,
115 const ProxyInfo& used_proxy_info, 116 const ProxyInfo& used_proxy_info,
116 bool was_alpn_negotiated, 117 bool was_alpn_negotiated,
117 NextProto negotiated_protocol, 118 NextProto negotiated_protocol,
118 bool using_spdy, 119 bool using_spdy);
119 const NetLogWithSource& net_log);
120 120
121 // Called when the Job detects that the endpoint indicated by the 121 // Called when the Job detects that the endpoint indicated by the
122 // Alternate-Protocol does not work. Lets the factory update 122 // Alternate-Protocol does not work. Lets the factory update
123 // HttpAlternateProtocols with the failure and resets the SPDY session key. 123 // HttpAlternateProtocols with the failure and resets the SPDY session key.
124 void OnBrokenAlternateProtocol(const Job*, const HostPortPair& origin); 124 void OnBrokenAlternateProtocol(const Job*, const HostPortPair& origin);
125 125
126 // Called when the Preconnect completes. Used for testing. 126 // Called when the Preconnect completes. Used for testing.
127 virtual void OnPreconnectsCompleteInternal() {} 127 virtual void OnPreconnectsCompleteInternal() {}
128 128
129 // Called when the JobController finishes service. Delete the JobController 129 // Called when the JobController finishes service. Delete the JobController
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 std::unique_ptr<JobFactory> job_factory_; 161 std::unique_ptr<JobFactory> job_factory_;
162 162
163 // Set of proxy servers that support request priorities to which subsequent 163 // Set of proxy servers that support request priorities to which subsequent
164 // preconnects should be skipped. 164 // preconnects should be skipped.
165 std::set<ProxyServer> preconnecting_proxy_servers_; 165 std::set<ProxyServer> preconnecting_proxy_servers_;
166 166
167 SpdySessionRequestMap spdy_session_request_map_; 167 SpdySessionRequestMap spdy_session_request_map_;
168 168
169 const bool for_websockets_; 169 const bool for_websockets_;
170 170
171 const NetLogWithSource factory_net_log_;
172
171 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); 173 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl);
172 }; 174 };
173 175
174 } // namespace net 176 } // namespace net
175 177
176 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ 178 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_stream_factory_impl.cc » ('j') | net/http/http_stream_factory_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698