| 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 #include "net/http/http_basic_stream.h" | 5 #include "net/http/http_basic_stream.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "net/http/http_request_info.h" | 8 #include "net/http/http_request_info.h" |
| 9 #include "net/http/http_response_body_drainer.h" | 9 #include "net/http/http_response_body_drainer.h" |
| 10 #include "net/http/http_stream_parser.h" | 10 #include "net/http/http_stream_parser.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 parser()->GetSSLCertRequestInfo(cert_request_info); | 104 parser()->GetSSLCertRequestInfo(cert_request_info); |
| 105 } | 105 } |
| 106 | 106 |
| 107 bool HttpBasicStream::GetRemoteEndpoint(IPEndPoint* endpoint) { | 107 bool HttpBasicStream::GetRemoteEndpoint(IPEndPoint* endpoint) { |
| 108 if (!state_.connection() || !state_.connection()->socket()) | 108 if (!state_.connection() || !state_.connection()->socket()) |
| 109 return false; | 109 return false; |
| 110 | 110 |
| 111 return state_.connection()->socket()->GetPeerAddress(endpoint) == OK; | 111 return state_.connection()->socket()->GetPeerAddress(endpoint) == OK; |
| 112 } | 112 } |
| 113 | 113 |
| 114 int HttpBasicStream::GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
| 115 std::vector<uint8_t>* out) { |
| 116 return parser()->GetSignedEKMForTokenBinding(key, out); |
| 117 } |
| 118 |
| 114 void HttpBasicStream::Drain(HttpNetworkSession* session) { | 119 void HttpBasicStream::Drain(HttpNetworkSession* session) { |
| 115 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this); | 120 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this); |
| 116 drainer->Start(session); | 121 drainer->Start(session); |
| 117 // |drainer| will delete itself. | 122 // |drainer| will delete itself. |
| 118 } | 123 } |
| 119 | 124 |
| 120 void HttpBasicStream::PopulateNetErrorDetails(NetErrorDetails* /*details*/) { | 125 void HttpBasicStream::PopulateNetErrorDetails(NetErrorDetails* /*details*/) { |
| 121 return; | 126 return; |
| 122 } | 127 } |
| 123 | 128 |
| 124 void HttpBasicStream::SetPriority(RequestPriority priority) { | 129 void HttpBasicStream::SetPriority(RequestPriority priority) { |
| 125 // TODO(akalin): Plumb this through to |connection_|. | 130 // TODO(akalin): Plumb this through to |connection_|. |
| 126 } | 131 } |
| 127 | 132 |
| 128 } // namespace net | 133 } // namespace net |
| OLD | NEW |