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

Side by Side Diff: net/quic/chromium/quic_stream_factory.cc

Issue 2521573006: Server push cancellation: change the ownership of ServerPushDelegate to HttpNetworkSession. (Closed)
Patch Set: rebase Created 4 years 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/quic/chromium/quic_stream_factory.h ('k') | net/spdy/spdy_session.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/quic/chromium/quic_stream_factory.h" 5 #include "net/quic/chromium/quic_stream_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <tuple> 8 #include <tuple>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 bool force_hol_blocking, 739 bool force_hol_blocking,
740 bool race_cert_verification, 740 bool race_cert_verification,
741 bool quic_do_not_fragment, 741 bool quic_do_not_fragment,
742 const QuicTagVector& connection_options, 742 const QuicTagVector& connection_options,
743 bool enable_token_binding) 743 bool enable_token_binding)
744 : require_confirmation_(true), 744 : require_confirmation_(true),
745 net_log_(net_log), 745 net_log_(net_log),
746 host_resolver_(host_resolver), 746 host_resolver_(host_resolver),
747 client_socket_factory_(client_socket_factory), 747 client_socket_factory_(client_socket_factory),
748 http_server_properties_(http_server_properties), 748 http_server_properties_(http_server_properties),
749 push_delegate_(nullptr),
749 proxy_delegate_(proxy_delegate), 750 proxy_delegate_(proxy_delegate),
750 transport_security_state_(transport_security_state), 751 transport_security_state_(transport_security_state),
751 cert_transparency_verifier_(cert_transparency_verifier), 752 cert_transparency_verifier_(cert_transparency_verifier),
752 quic_crypto_client_stream_factory_(quic_crypto_client_stream_factory), 753 quic_crypto_client_stream_factory_(quic_crypto_client_stream_factory),
753 random_generator_(random_generator), 754 random_generator_(random_generator),
754 clock_(clock), 755 clock_(clock),
755 max_packet_length_(max_packet_length), 756 max_packet_length_(max_packet_length),
756 clock_skew_detector_(base::TimeTicks::Now(), base::Time::Now()), 757 clock_skew_detector_(base::TimeTicks::Now(), base::Time::Now()),
757 socket_performance_watcher_factory_(socket_performance_watcher_factory), 758 socket_performance_watcher_factory_(socket_performance_watcher_factory),
758 config_(InitializeQuicConfig(connection_options, 759 config_(InitializeQuicConfig(connection_options,
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 socket_performance_watcher_factory_->CreateSocketPerformanceWatcher( 1678 socket_performance_watcher_factory_->CreateSocketPerformanceWatcher(
1678 SocketPerformanceWatcherFactory::PROTOCOL_QUIC); 1679 SocketPerformanceWatcherFactory::PROTOCOL_QUIC);
1679 } 1680 }
1680 1681
1681 *session = new QuicChromiumClientSession( 1682 *session = new QuicChromiumClientSession(
1682 connection, std::move(socket), this, quic_crypto_client_stream_factory_, 1683 connection, std::move(socket), this, quic_crypto_client_stream_factory_,
1683 clock_.get(), transport_security_state_, std::move(server_info), 1684 clock_.get(), transport_security_state_, std::move(server_info),
1684 server_id, yield_after_packets_, yield_after_duration_, cert_verify_flags, 1685 server_id, yield_after_packets_, yield_after_duration_, cert_verify_flags,
1685 config, &crypto_config_, network_connection_.GetDescription(), 1686 config, &crypto_config_, network_connection_.GetDescription(),
1686 dns_resolution_start_time, dns_resolution_end_time, &push_promise_index_, 1687 dns_resolution_start_time, dns_resolution_end_time, &push_promise_index_,
1687 task_runner_, std::move(socket_performance_watcher), net_log.net_log()); 1688 push_delegate_, task_runner_, std::move(socket_performance_watcher),
1689 net_log.net_log());
1688 1690
1689 all_sessions_[*session] = key; // owning pointer 1691 all_sessions_[*session] = key; // owning pointer
1690 writer->set_delegate(*session); 1692 writer->set_delegate(*session);
1691 1693
1692 (*session)->Initialize(); 1694 (*session)->Initialize();
1693 bool closed_during_initialize = !base::ContainsKey(all_sessions_, *session) || 1695 bool closed_during_initialize = !base::ContainsKey(all_sessions_, *session) ||
1694 !(*session)->connection()->connected(); 1696 !(*session)->connection()->connected();
1695 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.ClosedDuringInitializeSession", 1697 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.ClosedDuringInitializeSession",
1696 closed_during_initialize); 1698 closed_during_initialize);
1697 if (closed_during_initialize) { 1699 if (closed_during_initialize) {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1900 void QuicStreamFactory::OpenFactory() { 1902 void QuicStreamFactory::OpenFactory() {
1901 status_ = OPEN; 1903 status_ = OPEN;
1902 } 1904 }
1903 1905
1904 void QuicStreamFactory::MaybeClearConsecutiveDisabledCount() { 1906 void QuicStreamFactory::MaybeClearConsecutiveDisabledCount() {
1905 if (status_ == OPEN) 1907 if (status_ == OPEN)
1906 consecutive_disabled_count_ = 0; 1908 consecutive_disabled_count_ = 0;
1907 } 1909 }
1908 1910
1909 } // namespace net 1911 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_stream_factory.h ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698