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

Side by Side Diff: net/quic/quic_config.cc

Issue 351133002: Adds an internal server and chromium's flag for disabling/enabling FEC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_config.h ('k') | net/quic/quic_config_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/quic_config.h" 5 #include "net/quic/quic_config.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "net/quic/crypto/crypto_handshake_message.h" 10 #include "net/quic/crypto/crypto_handshake_message.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 QuicErrorCode error = 405 QuicErrorCode error =
406 peer_hello.GetTaglist(tag_, &received_tags, &received_tags_length); 406 peer_hello.GetTaglist(tag_, &received_tags, &received_tags_length);
407 switch (error) { 407 switch (error) {
408 case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND: 408 case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND:
409 if (presence_ == PRESENCE_OPTIONAL) { 409 if (presence_ == PRESENCE_OPTIONAL) {
410 return QUIC_NO_ERROR; 410 return QUIC_NO_ERROR;
411 } 411 }
412 *error_details = "Missing " + QuicUtils::TagToString(tag_); 412 *error_details = "Missing " + QuicUtils::TagToString(tag_);
413 break; 413 break;
414 case QUIC_NO_ERROR: 414 case QUIC_NO_ERROR:
415 DVLOG(1) << "Received Connection Option tags from receiver.";
415 has_receive_values_ = true; 416 has_receive_values_ = true;
416 for (size_t i = 0; i < received_tags_length; ++i) { 417 for (size_t i = 0; i < received_tags_length; ++i) {
417 receive_values_.push_back(received_tags[i]); 418 receive_values_.push_back(received_tags[i]);
418 } 419 }
419 break; 420 break;
420 default: 421 default:
421 *error_details = "Bad " + QuicUtils::TagToString(tag_); 422 *error_details = "Bad " + QuicUtils::TagToString(tag_);
422 break; 423 break;
423 } 424 }
424 return error; 425 return error;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 } 464 }
464 465
465 bool QuicConfig::HasReceivedConnectionOptions() const { 466 bool QuicConfig::HasReceivedConnectionOptions() const {
466 return connection_options_.HasReceivedValues(); 467 return connection_options_.HasReceivedValues();
467 } 468 }
468 469
469 QuicTagVector QuicConfig::ReceivedConnectionOptions() const { 470 QuicTagVector QuicConfig::ReceivedConnectionOptions() const {
470 return connection_options_.GetReceivedValues(); 471 return connection_options_.GetReceivedValues();
471 } 472 }
472 473
474 bool QuicConfig::HasSendConnectionOptions() const {
475 return connection_options_.HasSendValues();
476 }
477
478 QuicTagVector QuicConfig::SendConnectionOptions() const {
479 return connection_options_.GetSendValues();
480 }
481
473 void QuicConfig::SetLossDetectionToSend(QuicTag loss_detection) { 482 void QuicConfig::SetLossDetectionToSend(QuicTag loss_detection) {
474 loss_detection_.SetSendValue(loss_detection); 483 loss_detection_.SetSendValue(loss_detection);
475 } 484 }
476 485
477 bool QuicConfig::HasReceivedLossDetection() const { 486 bool QuicConfig::HasReceivedLossDetection() const {
478 return loss_detection_.HasReceivedValue(); 487 return loss_detection_.HasReceivedValue();
479 } 488 }
480 489
481 QuicTag QuicConfig::ReceivedLossDetection() const { 490 QuicTag QuicConfig::ReceivedLossDetection() const {
482 return loss_detection_.GetReceivedValue(); 491 return loss_detection_.GetReceivedValue();
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 peer_hello, hello_type, error_details); 719 peer_hello, hello_type, error_details);
711 } 720 }
712 if (error == QUIC_NO_ERROR) { 721 if (error == QUIC_NO_ERROR) {
713 error = connection_options_.ProcessPeerHello( 722 error = connection_options_.ProcessPeerHello(
714 peer_hello, hello_type, error_details); 723 peer_hello, hello_type, error_details);
715 } 724 }
716 return error; 725 return error;
717 } 726 }
718 727
719 } // namespace net 728 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_config.h ('k') | net/quic/quic_config_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698