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

Unified Diff: net/quic/quic_config.cc

Issue 13976007: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated copyright notice Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_config.h ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_config.cc
diff --git a/net/quic/quic_crypto_stream.cc b/net/quic/quic_config.cc
similarity index 67%
copy from net/quic/quic_crypto_stream.cc
copy to net/quic/quic_config.cc
index f033af82d35fe5649ff1a4abfe9667db618eb9d4..f16f06fde96d9942dda0a3dfa3c220479a7cd2ac 100644
--- a/net/quic/quic_crypto_stream.cc
+++ b/net/quic/quic_config.cc
@@ -1,66 +1,13 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/quic/quic_crypto_stream.h"
-
-#include <string>
-
-#include "base/strings/string_piece.h"
-#include "net/quic/crypto/crypto_handshake.h"
-#include "net/quic/quic_connection.h"
-#include "net/quic/quic_session.h"
+#include "net/quic/quic_config.h"
using std::string;
-using base::StringPiece;
namespace net {
-QuicCryptoStream::QuicCryptoStream(QuicSession* session)
- : ReliableQuicStream(kCryptoStreamId, session),
- handshake_complete_(false) {
- crypto_framer_.set_visitor(this);
-}
-
-void QuicCryptoStream::OnError(CryptoFramer* framer) {
- session()->ConnectionClose(framer->error(), false);
-}
-
-uint32 QuicCryptoStream::ProcessData(const char* data,
- uint32 data_len) {
- // Do not process handshake messages after the handshake is complete.
- if (handshake_complete()) {
- CloseConnection(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE);
- return 0;
- }
- if (!crypto_framer_.ProcessInput(StringPiece(data, data_len))) {
- CloseConnection(crypto_framer_.error());
- return 0;
- }
- return data_len;
-}
-
-void QuicCryptoStream::CloseConnection(QuicErrorCode error) {
- session()->connection()->SendConnectionClose(error);
-}
-
-void QuicCryptoStream::CloseConnectionWithDetails(QuicErrorCode error,
- const string& details) {
- session()->connection()->SendConnectionCloseWithDetails(error, details);
-}
-
-void QuicCryptoStream::SetHandshakeComplete(QuicErrorCode error) {
- handshake_complete_ = true;
- session()->OnCryptoHandshakeComplete(error);
-}
-
-void QuicCryptoStream::SendHandshakeMessage(
- const CryptoHandshakeMessage& message) {
- const QuicData& data = message.GetSerialized();
- // TODO(wtc): check the return value.
- WriteData(string(data.data(), data.length()), false);
-}
-
QuicNegotiatedParameters::QuicNegotiatedParameters()
: idle_connection_state_lifetime(QuicTime::Delta::Zero()),
keepalive_timeout(QuicTime::Delta::Zero()) {
@@ -98,7 +45,6 @@ bool QuicConfig::SetFromHandshakeMessage(const CryptoHandshakeMessage& scfg) {
if (error != QUIC_NO_ERROR) {
return false;
}
-
idle_connection_state_lifetime_ = QuicTime::Delta::FromSeconds(idle);
keepalive_timeout_ = QuicTime::Delta::Zero();
@@ -186,3 +132,4 @@ QuicErrorCode QuicConfig::ProcessFinalPeerHandshake(
}
} // namespace net
+
« no previous file with comments | « net/quic/quic_config.h ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698