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

Side by Side Diff: net/quic/crypto/quic_crypto_server_config.cc

Issue 1565303002: Change IPEndpoint::address() to return a net::IPAddress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback eroman Created 4 years, 11 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 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/quic/crypto/quic_crypto_server_config.h" 5 #include "net/quic/crypto/quic_crypto_server_config.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 out->set_tag(kSHLO); 825 out->set_tag(kSHLO);
826 QuicTagVector supported_version_tags; 826 QuicTagVector supported_version_tags;
827 for (size_t i = 0; i < supported_versions.size(); ++i) { 827 for (size_t i = 0; i < supported_versions.size(); ++i) {
828 supported_version_tags.push_back( 828 supported_version_tags.push_back(
829 QuicVersionToQuicTag(supported_versions[i])); 829 QuicVersionToQuicTag(supported_versions[i]));
830 } 830 }
831 out->SetVector(kVER, supported_version_tags); 831 out->SetVector(kVER, supported_version_tags);
832 out->SetStringPiece( 832 out->SetStringPiece(
833 kSourceAddressTokenTag, 833 kSourceAddressTokenTag,
834 NewSourceAddressToken(*requested_config.get(), info.source_address_tokens, 834 NewSourceAddressToken(*requested_config.get(), info.source_address_tokens,
835 client_address.address(), rand, info.now, nullptr)); 835 client_address.address().bytes(), rand, info.now,
836 nullptr));
836 QuicSocketAddressCoder address_coder(client_address); 837 QuicSocketAddressCoder address_coder(client_address);
837 out->SetStringPiece(kCADR, address_coder.Encode()); 838 out->SetStringPiece(kCADR, address_coder.Encode());
838 out->SetStringPiece(kPUBS, forward_secure_public_value); 839 out->SetStringPiece(kPUBS, forward_secure_public_value);
839 840
840 return QUIC_NO_ERROR; 841 return QUIC_NO_ERROR;
841 } 842 }
842 843
843 scoped_refptr<QuicCryptoServerConfig::Config> 844 scoped_refptr<QuicCryptoServerConfig::Config>
844 QuicCryptoServerConfig::GetConfigWithScid(StringPiece requested_scid) const { 845 QuicCryptoServerConfig::GetConfigWithScid(StringPiece requested_scid) const {
845 // In Chromium, we will dead lock if the lock is held by the current thread. 846 // In Chromium, we will dead lock if the lock is held by the current thread.
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 is_primary(false), 1805 is_primary(false),
1805 primary_time(QuicWallTime::Zero()), 1806 primary_time(QuicWallTime::Zero()),
1806 priority(0), 1807 priority(0),
1807 source_address_token_boxer(nullptr) {} 1808 source_address_token_boxer(nullptr) {}
1808 1809
1809 QuicCryptoServerConfig::Config::~Config() { 1810 QuicCryptoServerConfig::Config::~Config() {
1810 STLDeleteElements(&key_exchanges); 1811 STLDeleteElements(&key_exchanges);
1811 } 1812 }
1812 1813
1813 } // namespace net 1814 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698