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

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

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: one more fix, content bound_net_log_ 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_
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 void CloseSessionOnError(int error, QuicErrorCode quic_error); 221 void CloseSessionOnError(int error, QuicErrorCode quic_error);
222 222
223 // Close the session because of |error| and notifies the factory later that 223 // Close the session because of |error| and notifies the factory later that
224 // this session has been closed, which will delete the session. 224 // this session has been closed, which will delete the session.
225 void CloseSessionOnErrorAndNotifyFactoryLater(int error, 225 void CloseSessionOnErrorAndNotifyFactoryLater(int error,
226 QuicErrorCode quic_error); 226 QuicErrorCode quic_error);
227 227
228 std::unique_ptr<base::Value> GetInfoAsValue( 228 std::unique_ptr<base::Value> GetInfoAsValue(
229 const std::set<HostPortPair>& aliases); 229 const std::set<HostPortPair>& aliases);
230 230
231 const BoundNetLog& net_log() const { return net_log_; } 231 const NetLogWithSource& net_log() const { return net_log_; }
232 232
233 base::WeakPtr<QuicChromiumClientSession> GetWeakPtr(); 233 base::WeakPtr<QuicChromiumClientSession> GetWeakPtr();
234 234
235 // Returns the number of client hello messages that have been sent on the 235 // Returns the number of client hello messages that have been sent on the
236 // crypto stream. If the handshake has completed then this is one greater 236 // crypto stream. If the handshake has completed then this is one greater
237 // than the number of round-trips needed for the handshake. 237 // than the number of round-trips needed for the handshake.
238 int GetNumSentClientHellos() const; 238 int GetNumSentClientHellos() const;
239 239
240 // Returns true if |hostname| may be pooled onto this session. If this 240 // Returns true if |hostname| may be pooled onto this session. If this
241 // is a secure QUIC session, then |hostname| must match the certificate 241 // is a secure QUIC session, then |hostname| must match the certificate
(...skipping 19 matching lines...) Expand all
261 // kMaxReadersPerQuicSession. Takes ownership of |socket|, |reader|, 261 // kMaxReadersPerQuicSession. Takes ownership of |socket|, |reader|,
262 // and |writer|. 262 // and |writer|.
263 bool MigrateToSocket(std::unique_ptr<DatagramClientSocket> socket, 263 bool MigrateToSocket(std::unique_ptr<DatagramClientSocket> socket,
264 std::unique_ptr<QuicChromiumPacketReader> reader, 264 std::unique_ptr<QuicChromiumPacketReader> reader,
265 std::unique_ptr<QuicChromiumPacketWriter> writer); 265 std::unique_ptr<QuicChromiumPacketWriter> writer);
266 266
267 // Called when NetworkChangeNotifier notifies observers of a newly 267 // Called when NetworkChangeNotifier notifies observers of a newly
268 // connected network. Migrates this session to the newly connected 268 // connected network. Migrates this session to the newly connected
269 // network if the session has a pending migration. 269 // network if the session has a pending migration.
270 void OnNetworkConnected(NetworkChangeNotifier::NetworkHandle network, 270 void OnNetworkConnected(NetworkChangeNotifier::NetworkHandle network,
271 const BoundNetLog& bound_net_log); 271 const NetLogWithSource& net_log);
272 272
273 // Schedules a migration alarm to wait for a new network. 273 // Schedules a migration alarm to wait for a new network.
274 void OnNoNewNetwork(); 274 void OnNoNewNetwork();
275 275
276 // Called when migration alarm fires. If migration has not occurred 276 // Called when migration alarm fires. If migration has not occurred
277 // since alarm was set, closes session with error. 277 // since alarm was set, closes session with error.
278 void OnMigrationTimeout(size_t num_sockets); 278 void OnMigrationTimeout(size_t num_sockets);
279 279
280 // Populates network error details for this session. 280 // Populates network error details for this session.
281 void PopulateNetErrorDetails(NetErrorDetails* details); 281 void PopulateNetErrorDetails(NetErrorDetails* details);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 std::unique_ptr<QuicServerInfo> server_info_; 355 std::unique_ptr<QuicServerInfo> server_info_;
356 std::unique_ptr<CertVerifyResult> cert_verify_result_; 356 std::unique_ptr<CertVerifyResult> cert_verify_result_;
357 std::unique_ptr<ct::CTVerifyResult> ct_verify_result_; 357 std::unique_ptr<ct::CTVerifyResult> ct_verify_result_;
358 std::string pinning_failure_log_; 358 std::string pinning_failure_log_;
359 bool pkp_bypassed_; 359 bool pkp_bypassed_;
360 ObserverSet observers_; 360 ObserverSet observers_;
361 StreamRequestQueue stream_requests_; 361 StreamRequestQueue stream_requests_;
362 CompletionCallback callback_; 362 CompletionCallback callback_;
363 size_t num_total_streams_; 363 size_t num_total_streams_;
364 base::TaskRunner* task_runner_; 364 base::TaskRunner* task_runner_;
365 BoundNetLog net_log_; 365 NetLogWithSource net_log_;
366 std::vector<std::unique_ptr<QuicChromiumPacketReader>> packet_readers_; 366 std::vector<std::unique_ptr<QuicChromiumPacketReader>> packet_readers_;
367 LoadTimingInfo::ConnectTiming connect_timing_; 367 LoadTimingInfo::ConnectTiming connect_timing_;
368 std::unique_ptr<QuicConnectionLogger> logger_; 368 std::unique_ptr<QuicConnectionLogger> logger_;
369 // True when the session is going away, and streams may no longer be created 369 // True when the session is going away, and streams may no longer be created
370 // on this session. Existing stream will continue to be processed. 370 // on this session. Existing stream will continue to be processed.
371 bool going_away_; 371 bool going_away_;
372 // True when the session receives a go away from server due to port migration. 372 // True when the session receives a go away from server due to port migration.
373 bool port_migration_detected_; 373 bool port_migration_detected_;
374 TokenBindingSignatureMap token_binding_signatures_; 374 TokenBindingSignatureMap token_binding_signatures_;
375 // UMA histogram counters for streams pushed to this session. 375 // UMA histogram counters for streams pushed to this session.
376 int streams_pushed_count_; 376 int streams_pushed_count_;
377 int streams_pushed_and_claimed_count_; 377 int streams_pushed_and_claimed_count_;
378 // Stores packet that witnesses socket write error. This packet is 378 // Stores packet that witnesses socket write error. This packet is
379 // written to a new socket after migration completes. 379 // written to a new socket after migration completes.
380 scoped_refptr<StringIOBuffer> packet_; 380 scoped_refptr<StringIOBuffer> packet_;
381 // TODO(jri): Replace use of migration_pending_ sockets_.size(). 381 // TODO(jri): Replace use of migration_pending_ sockets_.size().
382 // When a task is posted for MigrateSessionOnError, pass in 382 // When a task is posted for MigrateSessionOnError, pass in
383 // sockets_.size(). Then in MigrateSessionOnError, check to see if 383 // sockets_.size(). Then in MigrateSessionOnError, check to see if
384 // the current sockets_.size() == the passed in value. 384 // the current sockets_.size() == the passed in value.
385 bool migration_pending_; // True while migration is underway. 385 bool migration_pending_; // True while migration is underway.
386 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; 386 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_;
387 387
388 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); 388 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession);
389 }; 389 };
390 390
391 } // namespace net 391 } // namespace net
392 392
393 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ 393 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698