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

Side by Side Diff: net/quic/core/quic_framer.cc

Issue 2517603003: Moves QuicTag typedefs, and QuicTag utility methods to quic_tag.{h,cc}. No behavior change. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « net/quic/core/quic_config.cc ('k') | net/quic/core/quic_protocol.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) 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/core/quic_framer.h" 5 #include "net/quic/core/quic_framer.h"
6 6
7 #include <cstdint> 7 #include <cstdint>
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 } 684 }
685 break; 685 break;
686 } 686 }
687 last_serialized_connection_id_ = header.public_header.connection_id; 687 last_serialized_connection_id_ = header.public_header.connection_id;
688 688
689 if (header.public_header.version_flag) { 689 if (header.public_header.version_flag) {
690 DCHECK_EQ(Perspective::IS_CLIENT, perspective_); 690 DCHECK_EQ(Perspective::IS_CLIENT, perspective_);
691 QuicTag tag = QuicVersionToQuicTag(quic_version_); 691 QuicTag tag = QuicVersionToQuicTag(quic_version_);
692 writer->WriteUInt32(tag); 692 writer->WriteUInt32(tag);
693 DVLOG(1) << "version = " << quic_version_ << ", tag = '" 693 DVLOG(1) << "version = " << quic_version_ << ", tag = '"
694 << QuicUtils::TagToString(tag) << "'"; 694 << QuicTagToString(tag) << "'";
695 } 695 }
696 696
697 if (header.public_header.multipath_flag && 697 if (header.public_header.multipath_flag &&
698 !writer->WriteUInt8(header.path_id)) { 698 !writer->WriteUInt8(header.path_id)) {
699 return false; 699 return false;
700 } 700 }
701 701
702 if (header.public_header.nonce != nullptr && 702 if (header.public_header.nonce != nullptr &&
703 !writer->WriteBytes(header.public_header.nonce, 703 !writer->WriteBytes(header.public_header.nonce,
704 kDiversificationNonceSize)) { 704 kDiversificationNonceSize)) {
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
2185 2185
2186 bool QuicFramer::RaiseError(QuicErrorCode error) { 2186 bool QuicFramer::RaiseError(QuicErrorCode error) {
2187 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error) 2187 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error)
2188 << " detail: " << detailed_error_; 2188 << " detail: " << detailed_error_;
2189 set_error(error); 2189 set_error(error);
2190 visitor_->OnError(this); 2190 visitor_->OnError(this);
2191 return false; 2191 return false;
2192 } 2192 }
2193 2193
2194 } // namespace net 2194 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_config.cc ('k') | net/quic/core/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698