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::GetTokenBindingMessageHeader(std::string* out) { |
| 115 return parser()->GetTokenBindingMessageHeader(out); |
| 116 } |
| 117 |
114 void HttpBasicStream::Drain(HttpNetworkSession* session) { | 118 void HttpBasicStream::Drain(HttpNetworkSession* session) { |
115 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this); | 119 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this); |
116 drainer->Start(session); | 120 drainer->Start(session); |
117 // |drainer| will delete itself. | 121 // |drainer| will delete itself. |
118 } | 122 } |
119 | 123 |
120 void HttpBasicStream::SetPriority(RequestPriority priority) { | 124 void HttpBasicStream::SetPriority(RequestPriority priority) { |
121 // TODO(akalin): Plumb this through to |connection_|. | 125 // TODO(akalin): Plumb this through to |connection_|. |
122 } | 126 } |
123 | 127 |
124 } // namespace net | 128 } // namespace net |
OLD | NEW |