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

Side by Side Diff: net/http/http_stream_factory_impl_job.cc

Issue 2783683002: Log source_dependency in HTTP2_SESSION_SEND_HEADERS. (Closed)
Patch Set: Fix use-after-free. Created 3 years, 8 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 #include "net/http/http_stream_factory_impl_job.h" 5 #include "net/http/http_stream_factory_impl_job.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 } 1179 }
1180 1180
1181 int HttpStreamFactoryImpl::Job::SetSpdyHttpStreamOrBidirectionalStreamImpl( 1181 int HttpStreamFactoryImpl::Job::SetSpdyHttpStreamOrBidirectionalStreamImpl(
1182 base::WeakPtr<SpdySession> session, 1182 base::WeakPtr<SpdySession> session,
1183 bool direct) { 1183 bool direct) {
1184 // TODO(ricea): Restore the code for WebSockets over SPDY once it's 1184 // TODO(ricea): Restore the code for WebSockets over SPDY once it's
1185 // implemented. 1185 // implemented.
1186 if (delegate_->for_websockets()) 1186 if (delegate_->for_websockets())
1187 return ERR_NOT_IMPLEMENTED; 1187 return ERR_NOT_IMPLEMENTED;
1188 if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) { 1188 if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) {
1189 bidirectional_stream_impl_.reset(new BidirectionalStreamSpdyImpl(session)); 1189 bidirectional_stream_impl_.reset(
1190 new BidirectionalStreamSpdyImpl(session, net_log_.source()));
1190 return OK; 1191 return OK;
1191 } 1192 }
1192 1193
1193 // TODO(willchan): Delete this code, because eventually, the 1194 // TODO(willchan): Delete this code, because eventually, the
1194 // HttpStreamFactoryImpl will be creating all the SpdyHttpStreams, since it 1195 // HttpStreamFactoryImpl will be creating all the SpdyHttpStreams, since it
1195 // will know when SpdySessions become available. 1196 // will know when SpdySessions become available.
1196 1197
1197 bool use_relative_url = 1198 bool use_relative_url =
1198 direct || request_info_.url.SchemeIs(url::kHttpsScheme); 1199 direct || request_info_.url.SchemeIs(url::kHttpsScheme);
1199 stream_.reset(new SpdyHttpStream(session, use_relative_url)); 1200 stream_.reset(
1201 new SpdyHttpStream(session, use_relative_url, net_log_.source()));
1200 return OK; 1202 return OK;
1201 } 1203 }
1202 1204
1203 int HttpStreamFactoryImpl::Job::DoCreateStream() { 1205 int HttpStreamFactoryImpl::Job::DoCreateStream() {
1204 // TODO(pkasting): Remove ScopedTracker below once crbug.com/462811 is fixed. 1206 // TODO(pkasting): Remove ScopedTracker below once crbug.com/462811 is fixed.
1205 tracked_objects::ScopedTracker tracking_profile( 1207 tracked_objects::ScopedTracker tracking_profile(
1206 FROM_HERE_WITH_EXPLICIT_FUNCTION( 1208 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1207 "462811 HttpStreamFactoryImpl::Job::DoCreateStream")); 1209 "462811 HttpStreamFactoryImpl::Job::DoCreateStream"));
1208 DCHECK(connection_->socket() || existing_spdy_session_.get() || using_quic_); 1210 DCHECK(connection_->socket() || existing_spdy_session_.get() || using_quic_);
1209 DCHECK(!IsQuicAlternative()); 1211 DCHECK(!IsQuicAlternative());
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 1557
1556 ConnectionAttempts socket_attempts = connection_->connection_attempts(); 1558 ConnectionAttempts socket_attempts = connection_->connection_attempts();
1557 if (connection_->socket()) { 1559 if (connection_->socket()) {
1558 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1560 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1559 } 1561 }
1560 1562
1561 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); 1563 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts);
1562 } 1564 }
1563 1565
1564 } // namespace net 1566 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | net/http/http_stream_factory_impl_job_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698