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

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

Issue 14816006: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_PRIVATE_EXPORT to QuicWallTime Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_config.h ('k') | net/quic/quic_connection.h » ('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 using std::string; 7 using std::string;
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 void QuicConfig::SetDefaults() { 24 void QuicConfig::SetDefaults() {
25 idle_connection_state_lifetime_ = QuicTime::Delta::FromSeconds(300); 25 idle_connection_state_lifetime_ = QuicTime::Delta::FromSeconds(300);
26 keepalive_timeout_ = QuicTime::Delta::Zero(); 26 keepalive_timeout_ = QuicTime::Delta::Zero();
27 congestion_control_.clear(); 27 congestion_control_.clear();
28 congestion_control_.push_back(kQBIC); 28 congestion_control_.push_back(kQBIC);
29 } 29 }
30 30
31 bool QuicConfig::SetFromHandshakeMessage(const CryptoHandshakeMessage& scfg) { 31 bool QuicConfig::SetFromHandshakeMessage(const CryptoHandshakeMessage& scfg) {
32 const CryptoTag* cgst; 32 const QuicTag* cgst;
33 size_t num_cgst; 33 size_t num_cgst;
34 QuicErrorCode error; 34 QuicErrorCode error;
35 35
36 error = scfg.GetTaglist(kCGST, &cgst, &num_cgst); 36 error = scfg.GetTaglist(kCGST, &cgst, &num_cgst);
37 if (error != QUIC_NO_ERROR) { 37 if (error != QUIC_NO_ERROR) {
38 return false; 38 return false;
39 } 39 }
40 40
41 congestion_control_.assign(cgst, cgst + num_cgst); 41 congestion_control_.assign(cgst, cgst + num_cgst);
42 42
(...skipping 23 matching lines...) Expand all
66 out->SetVector(kCGST, congestion_control_); 66 out->SetVector(kCGST, congestion_control_);
67 } 67 }
68 68
69 QuicErrorCode QuicConfig::ProcessFinalPeerHandshake( 69 QuicErrorCode QuicConfig::ProcessFinalPeerHandshake(
70 const CryptoHandshakeMessage& msg, 70 const CryptoHandshakeMessage& msg,
71 CryptoUtils::Priority priority, 71 CryptoUtils::Priority priority,
72 QuicNegotiatedParameters* out_params, 72 QuicNegotiatedParameters* out_params,
73 string* error_details) const { 73 string* error_details) const {
74 DCHECK(error_details != NULL); 74 DCHECK(error_details != NULL);
75 75
76 const CryptoTag* their_congestion_controls; 76 const QuicTag* their_congestion_controls;
77 size_t num_their_congestion_controls; 77 size_t num_their_congestion_controls;
78 QuicErrorCode error; 78 QuicErrorCode error;
79 79
80 error = msg.GetTaglist(kCGST, &their_congestion_controls, 80 error = msg.GetTaglist(kCGST, &their_congestion_controls,
81 &num_their_congestion_controls); 81 &num_their_congestion_controls);
82 if (error != QUIC_NO_ERROR) { 82 if (error != QUIC_NO_ERROR) {
83 *error_details = "Missing CGST"; 83 *error_details = "Missing CGST";
84 return error; 84 return error;
85 } 85 }
86 86
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 default: 120 default:
121 *error_details = "Bad KATO"; 121 *error_details = "Bad KATO";
122 return error; 122 return error;
123 } 123 }
124 124
125 return QUIC_NO_ERROR; 125 return QUIC_NO_ERROR;
126 } 126 }
127 127
128 } // namespace net 128 } // namespace net
129 129
OLDNEW
« no previous file with comments | « net/quic/quic_config.h ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698