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

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

Issue 2699433003: Add net-log entries when HttpStream jobs are forced to wait, and when they're delayed and resumed. (Closed)
Patch Set: fix comments from eroman Created 3 years, 10 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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 return session_->IsQuicEnabled() && 802 return session_->IsQuicEnabled() &&
803 (base::ContainsKey(session_->params().origins_to_force_quic_on, 803 (base::ContainsKey(session_->params().origins_to_force_quic_on,
804 HostPortPair()) || 804 HostPortPair()) ||
805 base::ContainsKey(session_->params().origins_to_force_quic_on, 805 base::ContainsKey(session_->params().origins_to_force_quic_on,
806 destination_)) && 806 destination_)) &&
807 proxy_info_.is_direct() && origin_url_.SchemeIs(url::kHttpsScheme); 807 proxy_info_.is_direct() && origin_url_.SchemeIs(url::kHttpsScheme);
808 } 808 }
809 809
810 int HttpStreamFactoryImpl::Job::DoWait() { 810 int HttpStreamFactoryImpl::Job::DoWait() {
811 next_state_ = STATE_WAIT_COMPLETE; 811 next_state_ = STATE_WAIT_COMPLETE;
812 if (delegate_->ShouldWait(this)) 812 bool should_wait = delegate_->ShouldWait(this);
813 net_log_.BeginEvent(NetLogEventType::HTTP_STREAM_JOB_WAITING,
814 NetLog::BoolCallback("should_wait", should_wait));
815 if (should_wait)
813 return ERR_IO_PENDING; 816 return ERR_IO_PENDING;
814 817
815 return OK; 818 return OK;
816 } 819 }
817 820
818 int HttpStreamFactoryImpl::Job::DoWaitComplete(int result) { 821 int HttpStreamFactoryImpl::Job::DoWaitComplete(int result) {
822 net_log_.EndEvent(NetLogEventType::HTTP_STREAM_JOB_WAITING);
819 DCHECK_EQ(OK, result); 823 DCHECK_EQ(OK, result);
820 next_state_ = STATE_INIT_CONNECTION; 824 next_state_ = STATE_INIT_CONNECTION;
821 return OK; 825 return OK;
822 } 826 }
823 827
824 int HttpStreamFactoryImpl::Job::DoInitConnection() { 828 int HttpStreamFactoryImpl::Job::DoInitConnection() {
825 int result = DoInitConnectionImpl(); 829 int result = DoInitConnectionImpl();
826 if (result != ERR_SPDY_SESSION_ALREADY_EXISTS) 830 if (result != ERR_SPDY_SESSION_ALREADY_EXISTS)
827 delegate_->OnConnectionInitialized(this, result); 831 delegate_->OnConnectionInitialized(this, result);
828 832
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1534 1538
1535 ConnectionAttempts socket_attempts = connection_->connection_attempts(); 1539 ConnectionAttempts socket_attempts = connection_->connection_attempts();
1536 if (connection_->socket()) { 1540 if (connection_->socket()) {
1537 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1541 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1538 } 1542 }
1539 1543
1540 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); 1544 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts);
1541 } 1545 }
1542 1546
1543 } // namespace net 1547 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/http/http_stream_factory_impl_job_controller.h » ('j') | net/http/http_stream_factory_impl_job_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698