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

Side by Side Diff: net/websockets/websocket_basic_handshake_stream.cc

Issue 1378613004: Set Token-Binding HTTP header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tb-tls-ext-new
Patch Set: Add UMA logging of Token Binding support and NetLog event for Token Binding key lookup Created 5 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/websockets/websocket_basic_handshake_stream.h" 5 #include "net/websockets/websocket_basic_handshake_stream.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <iterator> 9 #include <iterator>
10 #include <set> 10 #include <set>
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 parser()->GetSSLCertRequestInfo(cert_request_info); 431 parser()->GetSSLCertRequestInfo(cert_request_info);
432 } 432 }
433 433
434 bool WebSocketBasicHandshakeStream::GetRemoteEndpoint(IPEndPoint* endpoint) { 434 bool WebSocketBasicHandshakeStream::GetRemoteEndpoint(IPEndPoint* endpoint) {
435 if (!state_.connection() || !state_.connection()->socket()) 435 if (!state_.connection() || !state_.connection()->socket())
436 return false; 436 return false;
437 437
438 return state_.connection()->socket()->GetPeerAddress(endpoint) == OK; 438 return state_.connection()->socket()->GetPeerAddress(endpoint) == OK;
439 } 439 }
440 440
441 int WebSocketBasicHandshakeStream::GetProvidedTokenBindingWithKey(
442 const scoped_ptr<crypto::ECPrivateKey>& key,
443 std::string* header_out) {
444 NOTREACHED();
445 return ERR_NOT_IMPLEMENTED;
446 }
447
441 void WebSocketBasicHandshakeStream::Drain(HttpNetworkSession* session) { 448 void WebSocketBasicHandshakeStream::Drain(HttpNetworkSession* session) {
442 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this); 449 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this);
443 drainer->Start(session); 450 drainer->Start(session);
444 // |drainer| will delete itself. 451 // |drainer| will delete itself.
445 } 452 }
446 453
447 void WebSocketBasicHandshakeStream::SetPriority(RequestPriority priority) { 454 void WebSocketBasicHandshakeStream::SetPriority(RequestPriority priority) {
448 // TODO(ricea): See TODO comment in HttpBasicStream::SetPriority(). If it is 455 // TODO(ricea): See TODO comment in HttpBasicStream::SetPriority(). If it is
449 // gone, then copy whatever has happened there over here. 456 // gone, then copy whatever has happened there over here.
450 } 457 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 set_failure_message("Error during WebSocket handshake: " + failure_message); 591 set_failure_message("Error during WebSocket handshake: " + failure_message);
585 return ERR_INVALID_RESPONSE; 592 return ERR_INVALID_RESPONSE;
586 } 593 }
587 594
588 void WebSocketBasicHandshakeStream::set_failure_message( 595 void WebSocketBasicHandshakeStream::set_failure_message(
589 const std::string& failure_message) { 596 const std::string& failure_message) {
590 *failure_message_ = failure_message; 597 *failure_message_ = failure_message;
591 } 598 }
592 599
593 } // namespace net 600 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698