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

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

Issue 2222113003: Add UMA to net::BidirectionalStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use milliseconds and address other comments Created 4 years, 4 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
« no previous file with comments | « no previous file | net/http/bidirectional_stream.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_BIDIRECTIONAL_STREAM_H_ 5 #ifndef NET_HTTP_BIDIRECTIONAL_STREAM_H_
6 #define NET_HTTP_BIDIRECTIONAL_STREAM_H_ 6 #define NET_HTTP_BIDIRECTIONAL_STREAM_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/time/time.h"
16 #include "net/http/bidirectional_stream_impl.h" 17 #include "net/http/bidirectional_stream_impl.h"
17 #include "net/http/http_stream_factory.h" 18 #include "net/http/http_stream_factory.h"
18 #include "net/log/net_log.h" 19 #include "net/log/net_log.h"
19 20
20 class GURL; 21 class GURL;
21 22
22 namespace net { 23 namespace net {
23 24
24 class HttpAuthController; 25 class HttpAuthController;
25 class HttpNetworkSession; 26 class HttpNetworkSession;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 SSLCertRequestInfo* cert_info) override; 207 SSLCertRequestInfo* cert_info) override;
207 void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, 208 void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
208 const SSLConfig& used_ssl_config, 209 const SSLConfig& used_ssl_config,
209 const ProxyInfo& used_proxy_info, 210 const ProxyInfo& used_proxy_info,
210 HttpStream* stream) override; 211 HttpStream* stream) override;
211 void OnQuicBroken() override; 212 void OnQuicBroken() override;
212 213
213 // Helper method to notify delegate if there is an error. 214 // Helper method to notify delegate if there is an error.
214 void NotifyFailed(int error); 215 void NotifyFailed(int error);
215 216
217 void UpdateHistograms();
218
216 // BidirectionalStreamRequestInfo used when requesting the stream. 219 // BidirectionalStreamRequestInfo used when requesting the stream.
217 std::unique_ptr<BidirectionalStreamRequestInfo> request_info_; 220 std::unique_ptr<BidirectionalStreamRequestInfo> request_info_;
218 const BoundNetLog net_log_; 221 const BoundNetLog net_log_;
219 222
220 HttpNetworkSession* session_; 223 HttpNetworkSession* session_;
221 224
222 bool send_request_headers_automatically_; 225 bool send_request_headers_automatically_;
223 // Whether request headers have been sent, as indicated in OnStreamReady() 226 // Whether request headers have been sent, as indicated in OnStreamReady()
224 // callback. 227 // callback.
225 bool request_headers_sent_; 228 bool request_headers_sent_;
(...skipping 10 matching lines...) Expand all
236 // non-NULL, if the |stream_request_| successfully finishes. 239 // non-NULL, if the |stream_request_| successfully finishes.
237 std::unique_ptr<BidirectionalStreamImpl> stream_impl_; 240 std::unique_ptr<BidirectionalStreamImpl> stream_impl_;
238 241
239 // Buffer used for reading. 242 // Buffer used for reading.
240 scoped_refptr<IOBuffer> read_buffer_; 243 scoped_refptr<IOBuffer> read_buffer_;
241 // List of buffers used for writing. 244 // List of buffers used for writing.
242 std::vector<scoped_refptr<IOBuffer>> write_buffer_list_; 245 std::vector<scoped_refptr<IOBuffer>> write_buffer_list_;
243 // List of buffer length. 246 // List of buffer length.
244 std::vector<int> write_buffer_len_list_; 247 std::vector<int> write_buffer_len_list_;
245 248
249 base::TimeTicks start_time_;
mef 2016/08/11 15:42:19 Would it make sense to replace individual timetick
xunjieli 2016/08/11 19:37:09 That's a great idea! How about doing this as a fol
mef 2016/08/12 15:44:45 sgtm. Interesting observation about missing read_e
250 base::TimeTicks read_start_time_;
251 base::TimeTicks read_end_time_;
252 base::TimeTicks send_start_time_;
253 base::TimeTicks send_end_time_;
254
246 base::WeakPtrFactory<BidirectionalStream> weak_factory_; 255 base::WeakPtrFactory<BidirectionalStream> weak_factory_;
247 256
248 DISALLOW_COPY_AND_ASSIGN(BidirectionalStream); 257 DISALLOW_COPY_AND_ASSIGN(BidirectionalStream);
249 }; 258 };
250 259
251 } // namespace net 260 } // namespace net
252 261
253 #endif // NET_HTTP_BIDIRECTIONAL_STREAM_H_ 262 #endif // NET_HTTP_BIDIRECTIONAL_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/bidirectional_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698