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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 288003006: Tiny refactor of HttpStreamFactoryImpl::Job::Orphan to simplify the code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 8cd2de0dbdf2a48d729226f74da1c951d6475426..5ef911c3508bc1efeed494ec8ae36f9277d1ccc0 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -218,15 +218,17 @@ void HttpStreamFactoryImpl::Job::Orphan(const Request* request) {
blocking_job_->waiting_job_ = NULL;
blocking_job_ = NULL;
if (stream_factory_->for_websockets_ &&
- connection_ && connection_->socket())
+ connection_ && connection_->socket()) {
connection_->socket()->Disconnect();
+ }
stream_factory_->OnOrphanedJobComplete(this);
} else if (stream_factory_->for_websockets_) {
// We cancel this job because a WebSocketHandshakeStream can't be created
// without a WebSocketHandshakeStreamBase::CreateHelper which is stored in
// the Request class and isn't accessible from this job.
- if (connection_ && connection_->socket())
+ if (connection_ && connection_->socket()) {
connection_->socket()->Disconnect();
+ }
stream_factory_->OnOrphanedJobComplete(this);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698