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

Unified Diff: net/quic/core/quic_config.cc

Issue 2907743003: Change CryptoHandshakeMessage::GetTaglist to tag a QuicTagVector* (Closed)
Patch Set: fix QuicConfig Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/core/quic_config.cc
diff --git a/net/quic/core/quic_config.cc b/net/quic/core/quic_config.cc
index 745370895e49ef172d91cddc84b1d0435c058306..c6bab4ff2f81c69efae72a10df110f63422ee7f1 100644
--- a/net/quic/core/quic_config.cc
+++ b/net/quic/core/quic_config.cc
@@ -232,10 +232,8 @@ QuicErrorCode QuicFixedTagVector::ProcessPeerHello(
HelloType hello_type,
string* error_details) {
DCHECK(error_details != nullptr);
- const QuicTag* received_tags;
- size_t received_tags_length;
- QuicErrorCode error =
- peer_hello.GetTaglist(tag_, &received_tags, &received_tags_length);
+ QuicTagVector values;
+ QuicErrorCode error = peer_hello.GetTaglist(tag_, &values);
switch (error) {
case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND:
if (presence_ == PRESENCE_OPTIONAL) {
@@ -246,9 +244,8 @@ QuicErrorCode QuicFixedTagVector::ProcessPeerHello(
case QUIC_NO_ERROR:
QUIC_DVLOG(1) << "Received Connection Option tags from receiver.";
has_receive_values_ = true;
- for (size_t i = 0; i < received_tags_length; ++i) {
- receive_values_.push_back(received_tags[i]);
- }
+ receive_values_.insert(receive_values_.end(), values.begin(),
+ values.end());
break;
default:
*error_details = "Bad " + QuicTagToString(tag_);

Powered by Google App Engine
This is Rietveld 408576698