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

Side by Side Diff: net/quic/chromium/quic_chromium_client_session.h

Issue 2324183002: Implement QuicHttpStream::GetLoadTimingInfo (Closed)
Patch Set: address comments Created 4 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 (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 // A client specific QuicSession subclass. This class owns the underlying 5 // A client specific QuicSession subclass. This class owns the underlying
6 // QuicConnection and QuicConnectionHelper objects. The connection stores 6 // QuicConnection and QuicConnectionHelper objects. The connection stores
7 // a non-owning pointer to the helper so this session needs to ensure that 7 // a non-owning pointer to the helper so this session needs to ensure that
8 // the helper outlives the connection. 8 // the helper outlives the connection.
9 9
10 #ifndef NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ 10 #ifndef NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_
11 #define NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ 11 #define NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_
12 12
13 #include <stddef.h> 13 #include <stddef.h>
14 14
15 #include <list> 15 #include <list>
16 #include <memory> 16 #include <memory>
17 #include <set> 17 #include <set>
18 #include <string> 18 #include <string>
19 #include <vector> 19 #include <vector>
20 20
21 #include "base/containers/mru_cache.h" 21 #include "base/containers/mru_cache.h"
22 #include "base/macros.h" 22 #include "base/macros.h"
23 #include "base/time/time.h" 23 #include "base/time/time.h"
24 #include "net/base/completion_callback.h" 24 #include "net/base/completion_callback.h"
25 #include "net/base/load_timing_info.h"
25 #include "net/base/net_error_details.h" 26 #include "net/base/net_error_details.h"
26 #include "net/cert/ct_verify_result.h" 27 #include "net/cert/ct_verify_result.h"
27 #include "net/proxy/proxy_server.h" 28 #include "net/proxy/proxy_server.h"
28 #include "net/quic/chromium/quic_chromium_client_stream.h" 29 #include "net/quic/chromium/quic_chromium_client_stream.h"
29 #include "net/quic/chromium/quic_chromium_packet_reader.h" 30 #include "net/quic/chromium/quic_chromium_packet_reader.h"
30 #include "net/quic/chromium/quic_chromium_packet_writer.h" 31 #include "net/quic/chromium/quic_chromium_packet_writer.h"
31 #include "net/quic/chromium/quic_connection_logger.h" 32 #include "net/quic/chromium/quic_connection_logger.h"
32 #include "net/quic/core/quic_client_session_base.h" 33 #include "net/quic/core/quic_client_session_base.h"
33 #include "net/quic/core/quic_crypto_client_stream.h" 34 #include "net/quic/core/quic_crypto_client_stream.h"
34 #include "net/quic/core/quic_protocol.h" 35 #include "net/quic/core/quic_protocol.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 QuicClock* clock, 127 QuicClock* clock,
127 TransportSecurityState* transport_security_state, 128 TransportSecurityState* transport_security_state,
128 std::unique_ptr<QuicServerInfo> server_info, 129 std::unique_ptr<QuicServerInfo> server_info,
129 const QuicServerId& server_id, 130 const QuicServerId& server_id,
130 int yield_after_packets, 131 int yield_after_packets,
131 QuicTime::Delta yield_after_duration, 132 QuicTime::Delta yield_after_duration,
132 int cert_verify_flags, 133 int cert_verify_flags,
133 const QuicConfig& config, 134 const QuicConfig& config,
134 QuicCryptoClientConfig* crypto_config, 135 QuicCryptoClientConfig* crypto_config,
135 const char* const connection_description, 136 const char* const connection_description,
137 base::TimeTicks dns_resolution_start_time,
136 base::TimeTicks dns_resolution_end_time, 138 base::TimeTicks dns_resolution_end_time,
137 QuicClientPushPromiseIndex* push_promise_index, 139 QuicClientPushPromiseIndex* push_promise_index,
138 base::TaskRunner* task_runner, 140 base::TaskRunner* task_runner,
139 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, 141 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
140 NetLog* net_log); 142 NetLog* net_log);
141 ~QuicChromiumClientSession() override; 143 ~QuicChromiumClientSession() override;
142 144
143 void Initialize() override; 145 void Initialize() override;
144 146
145 void AddObserver(Observer* observer); 147 void AddObserver(Observer* observer);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 279
278 // Returns true if session has one ore more streams marked as non-migratable. 280 // Returns true if session has one ore more streams marked as non-migratable.
279 bool HasNonMigratableStreams() const; 281 bool HasNonMigratableStreams() const;
280 282
281 void HandlePromised(QuicStreamId associated_id, 283 void HandlePromised(QuicStreamId associated_id,
282 QuicStreamId promised_id, 284 QuicStreamId promised_id,
283 const SpdyHeaderBlock& headers) override; 285 const SpdyHeaderBlock& headers) override;
284 286
285 void DeletePromised(QuicClientPromisedInfo* promised) override; 287 void DeletePromised(QuicClientPromisedInfo* promised) override;
286 288
289 const LoadTimingInfo::ConnectTiming& GetConnectTiming();
290
287 protected: 291 protected:
288 // QuicSession methods: 292 // QuicSession methods:
289 bool ShouldCreateIncomingDynamicStream(QuicStreamId id) override; 293 bool ShouldCreateIncomingDynamicStream(QuicStreamId id) override;
290 bool ShouldCreateOutgoingDynamicStream() override; 294 bool ShouldCreateOutgoingDynamicStream() override;
291 295
292 QuicChromiumClientStream* CreateIncomingDynamicStream( 296 QuicChromiumClientStream* CreateIncomingDynamicStream(
293 QuicStreamId id) override; 297 QuicStreamId id) override;
294 298
295 private: 299 private:
296 friend class test::QuicChromiumClientSessionPeer; 300 friend class test::QuicChromiumClientSessionPeer;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 std::unique_ptr<ct::CTVerifyResult> ct_verify_result_; 347 std::unique_ptr<ct::CTVerifyResult> ct_verify_result_;
344 std::string pinning_failure_log_; 348 std::string pinning_failure_log_;
345 bool pkp_bypassed_; 349 bool pkp_bypassed_;
346 ObserverSet observers_; 350 ObserverSet observers_;
347 StreamRequestQueue stream_requests_; 351 StreamRequestQueue stream_requests_;
348 CompletionCallback callback_; 352 CompletionCallback callback_;
349 size_t num_total_streams_; 353 size_t num_total_streams_;
350 base::TaskRunner* task_runner_; 354 base::TaskRunner* task_runner_;
351 BoundNetLog net_log_; 355 BoundNetLog net_log_;
352 std::vector<std::unique_ptr<QuicChromiumPacketReader>> packet_readers_; 356 std::vector<std::unique_ptr<QuicChromiumPacketReader>> packet_readers_;
353 base::TimeTicks dns_resolution_end_time_; 357 LoadTimingInfo::ConnectTiming connect_timing_;
354 base::TimeTicks handshake_start_; // Time the handshake was started.
355 std::unique_ptr<QuicConnectionLogger> logger_; 358 std::unique_ptr<QuicConnectionLogger> logger_;
356 // True when the session is going away, and streams may no longer be created 359 // True when the session is going away, and streams may no longer be created
357 // on this session. Existing stream will continue to be processed. 360 // on this session. Existing stream will continue to be processed.
358 bool going_away_; 361 bool going_away_;
359 // True when the session receives a go away from server due to port migration. 362 // True when the session receives a go away from server due to port migration.
360 bool port_migration_detected_; 363 bool port_migration_detected_;
361 QuicDisabledReason disabled_reason_; 364 QuicDisabledReason disabled_reason_;
362 TokenBindingSignatureMap token_binding_signatures_; 365 TokenBindingSignatureMap token_binding_signatures_;
363 // UMA histogram counters for streams pushed to this session. 366 // UMA histogram counters for streams pushed to this session.
364 int streams_pushed_count_; 367 int streams_pushed_count_;
365 int streams_pushed_and_claimed_count_; 368 int streams_pushed_and_claimed_count_;
366 // Return value from packet rewrite packet on new socket. Used 369 // Return value from packet rewrite packet on new socket. Used
367 // during connection migration on socket write error. 370 // during connection migration on socket write error.
368 int error_code_from_rewrite_; 371 int error_code_from_rewrite_;
369 bool use_error_code_from_rewrite_; 372 bool use_error_code_from_rewrite_;
370 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; 373 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_;
371 374
372 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); 375 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession);
373 }; 376 };
374 377
375 } // namespace net 378 } // namespace net
376 379
377 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ 380 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698