Commit b3a34a34 authored by Ryan Hamilton's avatar Ryan Hamilton Committed by Commit Bot

Extract QuicServerSessionBasePeer to its own file so that...

Extract QuicServerSessionBasePeer to its own file so that GfeQuicServerSessionPeer does not need to be a friend of QuicServerSessionBase.

Change-Id: I8d0b2743f903f3fdfaa06346a9f006fccf78e622
Reviewed-on: https://chromium-review.googlesource.com/1148688Reviewed-by: default avatarZhongyi Shi <zhongyi@chromium.org>
Commit-Queue: Ryan Hamilton <rch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577672}
parent ea3d008f
...@@ -3101,6 +3101,7 @@ source_set("quic_test_tools") { ...@@ -3101,6 +3101,7 @@ source_set("quic_test_tools") {
"third_party/quic/test_tools/quic_packet_generator_peer.h", "third_party/quic/test_tools/quic_packet_generator_peer.h",
"third_party/quic/test_tools/quic_sent_packet_manager_peer.cc", "third_party/quic/test_tools/quic_sent_packet_manager_peer.cc",
"third_party/quic/test_tools/quic_sent_packet_manager_peer.h", "third_party/quic/test_tools/quic_sent_packet_manager_peer.h",
"third_party/quic/test_tools/quic_server_session_base_peer.h",
"third_party/quic/test_tools/quic_session_peer.cc", "third_party/quic/test_tools/quic_session_peer.cc",
"third_party/quic/test_tools/quic_session_peer.h", "third_party/quic/test_tools/quic_session_peer.h",
"third_party/quic/test_tools/quic_spdy_session_peer.cc", "third_party/quic/test_tools/quic_spdy_session_peer.cc",
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "net/third_party/quic/platform/api/quic_flags.h" #include "net/third_party/quic/platform/api/quic_flags.h"
#include "net/third_party/quic/platform/api/quic_logging.h" #include "net/third_party/quic/platform/api/quic_logging.h"
#include "net/third_party/quic/platform/api/quic_string.h" #include "net/third_party/quic/platform/api/quic_string.h"
#include "net/third_party/quic/platform/api/quic_string_piece.h"
namespace quic { namespace quic {
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "net/third_party/quic/test_tools/quic_connection_peer.h" #include "net/third_party/quic/test_tools/quic_connection_peer.h"
#include "net/third_party/quic/test_tools/quic_crypto_server_config_peer.h" #include "net/third_party/quic/test_tools/quic_crypto_server_config_peer.h"
#include "net/third_party/quic/test_tools/quic_sent_packet_manager_peer.h" #include "net/third_party/quic/test_tools/quic_sent_packet_manager_peer.h"
#include "net/third_party/quic/test_tools/quic_server_session_base_peer.h"
#include "net/third_party/quic/test_tools/quic_session_peer.h" #include "net/third_party/quic/test_tools/quic_session_peer.h"
#include "net/third_party/quic/test_tools/quic_spdy_session_peer.h" #include "net/third_party/quic/test_tools/quic_spdy_session_peer.h"
#include "net/third_party/quic/test_tools/quic_stream_peer.h" #include "net/third_party/quic/test_tools/quic_stream_peer.h"
...@@ -43,23 +44,6 @@ using testing::StrictMock; ...@@ -43,23 +44,6 @@ using testing::StrictMock;
namespace quic { namespace quic {
namespace test { namespace test {
class QuicServerSessionBasePeer {
public:
static QuicStream* GetOrCreateDynamicStream(QuicServerSessionBase* s,
QuicStreamId id) {
return s->GetOrCreateDynamicStream(id);
}
static void SetCryptoStream(QuicServerSessionBase* s,
QuicCryptoServerStream* crypto_stream) {
s->crypto_stream_.reset(crypto_stream);
s->static_streams()[kCryptoStreamId] = crypto_stream;
}
static bool IsBandwidthResumptionEnabled(QuicServerSessionBase* s) {
return s->bandwidth_resumption_enabled_;
}
};
namespace { namespace {
class TestServerSession : public QuicServerSessionBase { class TestServerSession : public QuicServerSessionBase {
......
// Copyright (c) 2018 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.
#ifndef NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_SERVER_SESSION_BASE_PEER_H_
#define NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_SERVER_SESSION_BASE_PEER_H_
#include "net/third_party/quic/core/http/quic_server_session_base.h"
namespace quic {
namespace test {
class QuicServerSessionBasePeer {
public:
static QuicStream* GetOrCreateDynamicStream(QuicServerSessionBase* s,
QuicStreamId id) {
return s->GetOrCreateDynamicStream(id);
}
static void SetCryptoStream(QuicServerSessionBase* s,
QuicCryptoServerStream* crypto_stream) {
s->crypto_stream_.reset(crypto_stream);
s->static_streams()[kCryptoStreamId] = crypto_stream;
}
static bool IsBandwidthResumptionEnabled(QuicServerSessionBase* s) {
return s->bandwidth_resumption_enabled_;
}
};
} // namespace test
} // namespace quic
#endif // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_SERVER_SESSION_BASE_PEER_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment