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

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

Issue 1009543004: Create a Perspective enum to use instead of a bool is_server to improve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NET_EXPORT_PRIVATE to fix compiler error Created 5 years, 9 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
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_client_stream_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) 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/quic_crypto_client_stream.h" 5 #include "net/quic/quic_crypto_client_stream.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.h"
9 #include "net/quic/crypto/crypto_protocol.h" 9 #include "net/quic/crypto/crypto_protocol.h"
10 #include "net/quic/crypto/crypto_utils.h" 10 #include "net/quic/crypto/crypto_utils.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 next_state_(STATE_IDLE), 81 next_state_(STATE_IDLE),
82 num_client_hellos_(0), 82 num_client_hellos_(0),
83 crypto_config_(crypto_config), 83 crypto_config_(crypto_config),
84 server_id_(server_id), 84 server_id_(server_id),
85 generation_counter_(0), 85 generation_counter_(0),
86 channel_id_sent_(false), 86 channel_id_sent_(false),
87 channel_id_source_callback_run_(false), 87 channel_id_source_callback_run_(false),
88 channel_id_source_callback_(nullptr), 88 channel_id_source_callback_(nullptr),
89 verify_context_(verify_context), 89 verify_context_(verify_context),
90 proof_verify_callback_(nullptr) { 90 proof_verify_callback_(nullptr) {
91 DCHECK(!session->connection()->is_server()); 91 DCHECK_EQ(Perspective::IS_CLIENT, session->connection()->perspective());
92 } 92 }
93 93
94 QuicCryptoClientStream::~QuicCryptoClientStream() { 94 QuicCryptoClientStream::~QuicCryptoClientStream() {
95 if (channel_id_source_callback_) { 95 if (channel_id_source_callback_) {
96 channel_id_source_callback_->Cancel(); 96 channel_id_source_callback_->Cancel();
97 } 97 }
98 if (proof_verify_callback_) { 98 if (proof_verify_callback_) {
99 proof_verify_callback_->Cancel(); 99 proof_verify_callback_->Cancel();
100 } 100 }
101 } 101 }
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 } 656 }
657 } 657 }
658 return false; 658 return false;
659 } 659 }
660 660
661 QuicClientSessionBase* QuicCryptoClientStream::client_session() { 661 QuicClientSessionBase* QuicCryptoClientStream::client_session() {
662 return reinterpret_cast<QuicClientSessionBase*>(session()); 662 return reinterpret_cast<QuicClientSessionBase*>(session());
663 } 663 }
664 664
665 } // namespace net 665 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698