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

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

Issue 301573002: Fix WeakPtrFactory member order in net/spdy and net/dns (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_stream.h » ('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 (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 <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 bool enable_sending_initial_data, 449 bool enable_sending_initial_data,
450 bool enable_compression, 450 bool enable_compression,
451 bool enable_ping_based_connection_checking, 451 bool enable_ping_based_connection_checking,
452 NextProto default_protocol, 452 NextProto default_protocol,
453 size_t stream_initial_recv_window_size, 453 size_t stream_initial_recv_window_size,
454 size_t initial_max_concurrent_streams, 454 size_t initial_max_concurrent_streams,
455 size_t max_concurrent_streams_limit, 455 size_t max_concurrent_streams_limit,
456 TimeFunc time_func, 456 TimeFunc time_func,
457 const HostPortPair& trusted_spdy_proxy, 457 const HostPortPair& trusted_spdy_proxy,
458 NetLog* net_log) 458 NetLog* net_log)
459 : weak_factory_(this), 459 : in_io_loop_(false),
460 in_io_loop_(false),
461 spdy_session_key_(spdy_session_key), 460 spdy_session_key_(spdy_session_key),
462 pool_(NULL), 461 pool_(NULL),
463 http_server_properties_(http_server_properties), 462 http_server_properties_(http_server_properties),
464 read_buffer_(new IOBuffer(kReadBufferSize)), 463 read_buffer_(new IOBuffer(kReadBufferSize)),
465 stream_hi_water_mark_(kFirstStreamId), 464 stream_hi_water_mark_(kFirstStreamId),
466 in_flight_write_frame_type_(DATA), 465 in_flight_write_frame_type_(DATA),
467 in_flight_write_frame_size_(0), 466 in_flight_write_frame_size_(0),
468 is_secure_(false), 467 is_secure_(false),
469 certificate_error_code_(OK), 468 certificate_error_code_(OK),
470 availability_state_(STATE_AVAILABLE), 469 availability_state_(STATE_AVAILABLE),
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 enable_sending_initial_data_(enable_sending_initial_data), 503 enable_sending_initial_data_(enable_sending_initial_data),
505 enable_compression_(enable_compression), 504 enable_compression_(enable_compression),
506 enable_ping_based_connection_checking_( 505 enable_ping_based_connection_checking_(
507 enable_ping_based_connection_checking), 506 enable_ping_based_connection_checking),
508 protocol_(default_protocol), 507 protocol_(default_protocol),
509 connection_at_risk_of_loss_time_( 508 connection_at_risk_of_loss_time_(
510 base::TimeDelta::FromSeconds(kDefaultConnectionAtRiskOfLossSeconds)), 509 base::TimeDelta::FromSeconds(kDefaultConnectionAtRiskOfLossSeconds)),
511 hung_interval_( 510 hung_interval_(
512 base::TimeDelta::FromSeconds(kHungIntervalSeconds)), 511 base::TimeDelta::FromSeconds(kHungIntervalSeconds)),
513 trusted_spdy_proxy_(trusted_spdy_proxy), 512 trusted_spdy_proxy_(trusted_spdy_proxy),
514 time_func_(time_func) { 513 time_func_(time_func),
514 weak_factory_(this) {
515 DCHECK_GE(protocol_, kProtoSPDYMinimumVersion); 515 DCHECK_GE(protocol_, kProtoSPDYMinimumVersion);
516 DCHECK_LE(protocol_, kProtoSPDYMaximumVersion); 516 DCHECK_LE(protocol_, kProtoSPDYMaximumVersion);
517 DCHECK(HttpStreamFactory::spdy_enabled()); 517 DCHECK(HttpStreamFactory::spdy_enabled());
518 net_log_.BeginEvent( 518 net_log_.BeginEvent(
519 NetLog::TYPE_SPDY_SESSION, 519 NetLog::TYPE_SPDY_SESSION,
520 base::Bind(&NetLogSpdySessionCallback, &host_port_proxy_pair())); 520 base::Bind(&NetLogSpdySessionCallback, &host_port_proxy_pair()));
521 next_unclaimed_push_stream_sweep_time_ = time_func_() + 521 next_unclaimed_push_stream_sweep_time_ = time_func_() +
522 base::TimeDelta::FromSeconds(kMinPushedStreamLifetimeSeconds); 522 base::TimeDelta::FromSeconds(kMinPushedStreamLifetimeSeconds);
523 // TODO(mbelshe): consider randomization of the stream_hi_water_mark. 523 // TODO(mbelshe): consider randomization of the stream_hi_water_mark.
524 } 524 }
(...skipping 2550 matching lines...) Expand 10 before | Expand all | Expand 10 after
3075 if (!queue->empty()) { 3075 if (!queue->empty()) {
3076 SpdyStreamId stream_id = queue->front(); 3076 SpdyStreamId stream_id = queue->front();
3077 queue->pop_front(); 3077 queue->pop_front();
3078 return stream_id; 3078 return stream_id;
3079 } 3079 }
3080 } 3080 }
3081 return 0; 3081 return 0;
3082 } 3082 }
3083 3083
3084 } // namespace net 3084 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698