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

Side by Side Diff: net/quic/core/quic_client_promised_info.cc

Issue 2544063002: Deprecate FLAGS_quic_send_push_stream_timed_out_error. (Closed)
Patch Set: 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 | « no previous file | net/quic/core/quic_client_promised_info_test.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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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/core/quic_client_promised_info.h" 5 #include "net/quic/core/quic_client_promised_info.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/core/spdy_utils.h" 8 #include "net/quic/core/spdy_utils.h"
9 9
10 using net::SpdyHeaderBlock; 10 using net::SpdyHeaderBlock;
11 using net::kPushPromiseTimeoutSecs; 11 using net::kPushPromiseTimeoutSecs;
12 using std::string; 12 using std::string;
13 13
14 namespace net { 14 namespace net {
15 15
16 QuicClientPromisedInfo::QuicClientPromisedInfo(QuicClientSessionBase* session, 16 QuicClientPromisedInfo::QuicClientPromisedInfo(QuicClientSessionBase* session,
17 QuicStreamId id, 17 QuicStreamId id,
18 string url) 18 string url)
19 : session_(session), 19 : session_(session),
20 id_(id), 20 id_(id),
21 url_(std::move(url)), 21 url_(std::move(url)),
22 client_request_delegate_(nullptr) {} 22 client_request_delegate_(nullptr) {}
23 23
24 QuicClientPromisedInfo::~QuicClientPromisedInfo() {} 24 QuicClientPromisedInfo::~QuicClientPromisedInfo() {}
25 25
26 void QuicClientPromisedInfo::CleanupAlarm::OnAlarm() { 26 void QuicClientPromisedInfo::CleanupAlarm::OnAlarm() {
27 DVLOG(1) << "self GC alarm for stream " << promised_->id_; 27 DVLOG(1) << "self GC alarm for stream " << promised_->id_;
28 promised_->session()->OnPushStreamTimedOut(promised_->id_); 28 promised_->session()->OnPushStreamTimedOut(promised_->id_);
29 if (FLAGS_quic_send_push_stream_timed_out_error) { 29 promised_->Reset(QUIC_PUSH_STREAM_TIMED_OUT);
30 promised_->Reset(QUIC_PUSH_STREAM_TIMED_OUT);
31 } else {
32 promised_->Reset(QUIC_STREAM_CANCELLED);
33 }
34 } 30 }
35 31
36 void QuicClientPromisedInfo::Init() { 32 void QuicClientPromisedInfo::Init() {
37 cleanup_alarm_.reset(session_->connection()->alarm_factory()->CreateAlarm( 33 cleanup_alarm_.reset(session_->connection()->alarm_factory()->CreateAlarm(
38 new QuicClientPromisedInfo::CleanupAlarm(this))); 34 new QuicClientPromisedInfo::CleanupAlarm(this)));
39 cleanup_alarm_->Set( 35 cleanup_alarm_->Set(
40 session_->connection()->helper()->GetClock()->ApproximateNow() + 36 session_->connection()->helper()->GetClock()->ApproximateNow() +
41 QuicTime::Delta::FromSeconds(kPushPromiseTimeoutSecs)); 37 QuicTime::Delta::FromSeconds(kPushPromiseTimeoutSecs));
42 } 38 }
43 39
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 return FinalValidation(); 124 return FinalValidation();
129 } 125 }
130 126
131 void QuicClientPromisedInfo::Cancel() { 127 void QuicClientPromisedInfo::Cancel() {
132 // Don't fire OnRendezvousResult() for client initiated cancel. 128 // Don't fire OnRendezvousResult() for client initiated cancel.
133 client_request_delegate_ = nullptr; 129 client_request_delegate_ = nullptr;
134 Reset(QUIC_STREAM_CANCELLED); 130 Reset(QUIC_STREAM_CANCELLED);
135 } 131 }
136 132
137 } // namespace net 133 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/quic_client_promised_info_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698