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

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

Issue 2337253004: Update Token Binding code to the latest drafts (Closed)
Patch Set: Fix compilation error in unit_tests Created 4 years, 3 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_basic_stream.h" 5 #include "net/http/http_basic_stream.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "net/http/http_request_info.h" 9 #include "net/http/http_request_info.h"
10 #include "net/http/http_response_body_drainer.h" 10 #include "net/http/http_response_body_drainer.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 parser()->GetSSLCertRequestInfo(cert_request_info); 108 parser()->GetSSLCertRequestInfo(cert_request_info);
109 } 109 }
110 110
111 bool HttpBasicStream::GetRemoteEndpoint(IPEndPoint* endpoint) { 111 bool HttpBasicStream::GetRemoteEndpoint(IPEndPoint* endpoint) {
112 if (!state_.connection() || !state_.connection()->socket()) 112 if (!state_.connection() || !state_.connection()->socket())
113 return false; 113 return false;
114 114
115 return state_.connection()->socket()->GetPeerAddress(endpoint) == OK; 115 return state_.connection()->socket()->GetPeerAddress(endpoint) == OK;
116 } 116 }
117 117
118 Error HttpBasicStream::GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, 118 Error HttpBasicStream::GetTokenBindingSignature(crypto::ECPrivateKey* key,
119 std::vector<uint8_t>* out) { 119 TokenBindingType tb_type,
120 return parser()->GetSignedEKMForTokenBinding(key, out); 120 std::vector<uint8_t>* out) {
121 return parser()->GetTokenBindingSignature(key, tb_type, out);
121 } 122 }
122 123
123 void HttpBasicStream::Drain(HttpNetworkSession* session) { 124 void HttpBasicStream::Drain(HttpNetworkSession* session) {
124 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this); 125 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this);
125 drainer->Start(session); 126 drainer->Start(session);
126 // |drainer| will delete itself. 127 // |drainer| will delete itself.
127 } 128 }
128 129
129 void HttpBasicStream::PopulateNetErrorDetails(NetErrorDetails* details) { 130 void HttpBasicStream::PopulateNetErrorDetails(NetErrorDetails* details) {
130 // TODO(mmenke): Consumers don't actually care about HTTP version, but seems 131 // TODO(mmenke): Consumers don't actually care about HTTP version, but seems
131 // like the right version should be reported, if headers were received. 132 // like the right version should be reported, if headers were received.
132 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP1_1; 133 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP1_1;
133 return; 134 return;
134 } 135 }
135 136
136 void HttpBasicStream::SetPriority(RequestPriority priority) { 137 void HttpBasicStream::SetPriority(RequestPriority priority) {
137 // TODO(akalin): Plumb this through to |connection_|. 138 // TODO(akalin): Plumb this through to |connection_|.
138 } 139 }
139 140
140 } // namespace net 141 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698