| OLD | NEW |
| 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 // TODO(ukai): code is similar with http_network_transaction.cc. We should | 5 // TODO(ukai): code is similar with http_network_transaction.cc. We should |
| 6 // think about ways to share code, if possible. | 6 // think about ways to share code, if possible. |
| 7 | 7 |
| 8 #include "net/socket_stream/socket_stream.h" | 8 #include "net/socket_stream/socket_stream.h" |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 | 623 |
| 624 // TODO(toyoshim): Check server advertisement of SPDY through the HTTP | 624 // TODO(toyoshim): Check server advertisement of SPDY through the HTTP |
| 625 // Alternate-Protocol header, then switch to SPDY if SPDY is available. | 625 // Alternate-Protocol header, then switch to SPDY if SPDY is available. |
| 626 // Usually we already have a session to the SPDY server because JavaScript | 626 // Usually we already have a session to the SPDY server because JavaScript |
| 627 // running WebSocket itself would be served by SPDY. But, in some situation | 627 // running WebSocket itself would be served by SPDY. But, in some situation |
| 628 // (E.g. Used by Chrome Extensions or used for cross origin connection), this | 628 // (E.g. Used by Chrome Extensions or used for cross origin connection), this |
| 629 // connection might be the first one. At that time, we should check | 629 // connection might be the first one. At that time, we should check |
| 630 // Alternate-Protocol header here for ws:// or TLS NPN extension for wss:// . | 630 // Alternate-Protocol header here for ws:// or TLS NPN extension for wss:// . |
| 631 | 631 |
| 632 return context_->proxy_service()->ResolveProxy( | 632 return context_->proxy_service()->ResolveProxy( |
| 633 proxy_url_, &proxy_info_, io_callback_, &pac_request_, net_log_); | 633 proxy_url_, 0, &proxy_info_, io_callback_, &pac_request_, net_log_); |
| 634 } | 634 } |
| 635 | 635 |
| 636 int SocketStream::DoResolveProxyComplete(int result) { | 636 int SocketStream::DoResolveProxyComplete(int result) { |
| 637 pac_request_ = NULL; | 637 pac_request_ = NULL; |
| 638 if (result != OK) { | 638 if (result != OK) { |
| 639 DVLOG(1) << "Failed to resolve proxy: " << result; | 639 DVLOG(1) << "Failed to resolve proxy: " << result; |
| 640 if (delegate_) | 640 if (delegate_) |
| 641 delegate_->OnError(this, result); | 641 delegate_->OnError(this, result); |
| 642 proxy_info_.UseDirect(); | 642 proxy_info_.UseDirect(); |
| 643 } | 643 } |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 | 1346 |
| 1347 delegate_->OnSSLCertificateError(this, ssl_info, fatal); | 1347 delegate_->OnSSLCertificateError(this, ssl_info, fatal); |
| 1348 return ERR_IO_PENDING; | 1348 return ERR_IO_PENDING; |
| 1349 } | 1349 } |
| 1350 | 1350 |
| 1351 CookieStore* SocketStream::cookie_store() const { | 1351 CookieStore* SocketStream::cookie_store() const { |
| 1352 return cookie_store_; | 1352 return cookie_store_; |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 } // namespace net | 1355 } // namespace net |
| OLD | NEW |