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

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

Issue 925423004: Fully qualify std::* names being exported internally by using (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ignore_goaways_86198166
Patch Set: Created 5 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/crypto_framer.h" 5 #include "net/quic/crypto/crypto_framer.h"
6 6
7 #include "net/quic/crypto/crypto_protocol.h" 7 #include "net/quic/crypto/crypto_protocol.h"
8 #include "net/quic/quic_data_reader.h" 8 #include "net/quic/quic_data_reader.h"
9 #include "net/quic/quic_data_writer.h" 9 #include "net/quic/quic_data_writer.h"
10 10
11 using base::StringPiece; 11 using base::StringPiece;
12 using std::make_pair;
13 using std::pair; 12 using std::pair;
14 using std::vector; 13 using std::vector;
15 14
16 namespace net { 15 namespace net {
17 16
18 namespace { 17 namespace {
19 18
20 const size_t kQuicTagSize = sizeof(uint32); 19 const size_t kQuicTagSize = sizeof(uint32);
21 const size_t kCryptoEndOffsetSize = sizeof(uint32); 20 const size_t kCryptoEndOffsetSize = sizeof(uint32);
22 const size_t kNumEntriesSize = sizeof(uint16); 21 const size_t kNumEntriesSize = sizeof(uint16);
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 234 }
236 return QUIC_CRYPTO_TAGS_OUT_OF_ORDER; 235 return QUIC_CRYPTO_TAGS_OUT_OF_ORDER;
237 } 236 }
238 237
239 uint32 end_offset; 238 uint32 end_offset;
240 reader.ReadUInt32(&end_offset); 239 reader.ReadUInt32(&end_offset);
241 240
242 if (end_offset < last_end_offset) { 241 if (end_offset < last_end_offset) {
243 return QUIC_CRYPTO_TAGS_OUT_OF_ORDER; 242 return QUIC_CRYPTO_TAGS_OUT_OF_ORDER;
244 } 243 }
245 tags_and_lengths_.push_back( 244 tags_and_lengths_.push_back(std::make_pair(
246 make_pair(tag, static_cast<size_t>(end_offset - last_end_offset))); 245 tag, static_cast<size_t>(end_offset - last_end_offset)));
247 last_end_offset = end_offset; 246 last_end_offset = end_offset;
248 } 247 }
249 values_len_ = last_end_offset; 248 values_len_ = last_end_offset;
250 state_ = STATE_READING_VALUES; 249 state_ = STATE_READING_VALUES;
251 } 250 }
252 case STATE_READING_VALUES: 251 case STATE_READING_VALUES:
253 if (reader.BytesRemaining() < values_len_) { 252 if (reader.BytesRemaining() < values_len_) {
254 break; 253 break;
255 } 254 }
256 for (vector<pair<QuicTag, size_t> >::const_iterator 255 for (vector<pair<QuicTag, size_t> >::const_iterator
(...skipping 23 matching lines...) Expand all
280 } 279 }
281 *end_offset += pad_length; 280 *end_offset += pad_length;
282 if (!writer->WriteUInt32(*end_offset)) { 281 if (!writer->WriteUInt32(*end_offset)) {
283 DCHECK(false) << "Failed to write end offset."; 282 DCHECK(false) << "Failed to write end offset.";
284 return false; 283 return false;
285 } 284 }
286 return true; 285 return true;
287 } 286 }
288 287
289 } // namespace net 288 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_test.cc ('k') | net/quic/crypto/quic_crypto_client_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698