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

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

Issue 440293003: Return ERR_NOT_IMPLEMENTED when we reach SPDY stream creation code in a factory for WebSocket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use ERR_NOT_IMPLEMENTED Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 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 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 } 1115 }
1116 } 1116 }
1117 1117
1118 if (!spdy_session) 1118 if (!spdy_session)
1119 return ERR_CONNECTION_CLOSED; 1119 return ERR_CONNECTION_CLOSED;
1120 1120
1121 // TODO(willchan): Delete this code, because eventually, the 1121 // TODO(willchan): Delete this code, because eventually, the
1122 // HttpStreamFactoryImpl will be creating all the SpdyHttpStreams, since it 1122 // HttpStreamFactoryImpl will be creating all the SpdyHttpStreams, since it
1123 // will know when SpdySessions become available. 1123 // will know when SpdySessions become available.
1124 1124
1125 if (stream_factory_->for_websockets_) { 1125 // TODO(ricea): Restore the code for WebSockets over SPDY once it's
1126 // TODO(ricea): Restore this code when WebSockets over SPDY is implemented. 1126 // implemented.
1127 NOTREACHED(); 1127 if (stream_factory_->for_websockets_)
1128 } else { 1128 return ERR_NOT_IMPLEMENTED;
1129 bool use_relative_url = direct || request_info_.url.SchemeIs("https"); 1129
1130 stream_.reset(new SpdyHttpStream(spdy_session, use_relative_url)); 1130 bool use_relative_url = direct || request_info_.url.SchemeIs("https");
1131 } 1131 stream_.reset(new SpdyHttpStream(spdy_session, use_relative_url));
1132
1132 return OK; 1133 return OK;
1133 } 1134 }
1134 1135
1135 int HttpStreamFactoryImpl::Job::DoCreateStreamComplete(int result) { 1136 int HttpStreamFactoryImpl::Job::DoCreateStreamComplete(int result) {
1136 if (result < 0) 1137 if (result < 0)
1137 return result; 1138 return result;
1138 1139
1139 session_->proxy_service()->ReportSuccess(proxy_info_); 1140 session_->proxy_service()->ReportSuccess(proxy_info_);
1140 next_state_ = STATE_NONE; 1141 next_state_ = STATE_NONE;
1141 return OK; 1142 return OK;
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 1473
1473 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) { 1474 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) {
1474 HistogramBrokenAlternateProtocolLocation( 1475 HistogramBrokenAlternateProtocolLocation(
1475 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN); 1476 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN);
1476 session_->http_server_properties()->SetBrokenAlternateProtocol( 1477 session_->http_server_properties()->SetBrokenAlternateProtocol(
1477 HostPortPair::FromURL(request_info_.url)); 1478 HostPortPair::FromURL(request_info_.url));
1478 } 1479 }
1479 } 1480 }
1480 1481
1481 } // namespace net 1482 } // namespace net
OLDNEW
« 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