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

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: 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..bb725eaa64c61da1cde062f5f54ce1006b242f33 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -217,16 +217,14 @@ void HttpStreamFactoryImpl::Job::Orphan(const Request* request) {
DCHECK(blocking_job_->waiting_job_);
blocking_job_->waiting_job_ = NULL;
blocking_job_ = NULL;
mmenke 2014/05/15 18:30:21 We're no longer calling OnOrphanedJobComplete in t
Ryan Hamilton 2014/05/15 18:47:39 ARGH! No, this was *not* intentional. I misread th
- if (stream_factory_->for_websockets_ &&
- connection_ && connection_->socket())
- connection_->socket()->Disconnect();
- stream_factory_->OnOrphanedJobComplete(this);
- } else if (stream_factory_->for_websockets_) {
+ }
+
+ if (stream_factory_->for_websockets_ &&
+ connection_ && connection_->socket()) {
+ connection_->socket()->Disconnect();
// 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())
- 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