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

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

Issue 14813024: Introduce RequestWebSocketStream into HttpStreamFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 proxy_info_ = used_proxy_info; 423 proxy_info_ = used_proxy_info;
424 response_.was_npn_negotiated = stream_request_->was_npn_negotiated(); 424 response_.was_npn_negotiated = stream_request_->was_npn_negotiated();
425 response_.npn_negotiated_protocol = SSLClientSocket::NextProtoToString( 425 response_.npn_negotiated_protocol = SSLClientSocket::NextProtoToString(
426 stream_request_->protocol_negotiated()); 426 stream_request_->protocol_negotiated());
427 response_.was_fetched_via_spdy = stream_request_->using_spdy(); 427 response_.was_fetched_via_spdy = stream_request_->using_spdy();
428 response_.was_fetched_via_proxy = !proxy_info_.is_direct(); 428 response_.was_fetched_via_proxy = !proxy_info_.is_direct();
429 429
430 OnIOComplete(OK); 430 OnIOComplete(OK);
431 } 431 }
432 432
433 void HttpNetworkTransaction::OnWebSocketStreamReady(
434 const SSLConfig& used_ssl_config,
435 const ProxyInfo& used_proxy_info,
436 WebSocketStreamBase* stream) {
437 NOTREACHED() << "This function should never be called.";
438 }
439
433 void HttpNetworkTransaction::OnStreamFailed(int result, 440 void HttpNetworkTransaction::OnStreamFailed(int result,
434 const SSLConfig& used_ssl_config) { 441 const SSLConfig& used_ssl_config) {
435 DCHECK_EQ(STATE_CREATE_STREAM_COMPLETE, next_state_); 442 DCHECK_EQ(STATE_CREATE_STREAM_COMPLETE, next_state_);
436 DCHECK_NE(OK, result); 443 DCHECK_NE(OK, result);
437 DCHECK(stream_request_.get()); 444 DCHECK(stream_request_.get());
438 DCHECK(!stream_.get()); 445 DCHECK(!stream_.get());
439 server_ssl_config_ = used_ssl_config; 446 server_ssl_config_ = used_ssl_config;
440 447
441 OnIOComplete(result); 448 OnIOComplete(result);
442 } 449 }
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1442 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 1449 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
1443 state); 1450 state);
1444 break; 1451 break;
1445 } 1452 }
1446 return description; 1453 return description;
1447 } 1454 }
1448 1455
1449 #undef STATE_CASE 1456 #undef STATE_CASE
1450 1457
1451 } // namespace net 1458 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698