Replace QuicString with std::string, pass 1
This replaces QuicString with std::string in all of the "QUIC proper". I will
delete QuicString once all code using it is gone.
gfe-relnote: n/a (no functional change)
PiperOrigin-RevId: 237872023
Change-Id: I82de62c9855516b15039734d05155917e68ff4ee
diff --git a/quic/test_tools/crypto_test_utils.cc b/quic/test_tools/crypto_test_utils.cc
index 7179288..3b13e65 100644
--- a/quic/test_tools/crypto_test_utils.cc
+++ b/quic/test_tools/crypto_test_utils.cc
@@ -48,7 +48,7 @@
TestChannelIDKey::~TestChannelIDKey() {}
bool TestChannelIDKey::Sign(QuicStringPiece signed_data,
- QuicString* out_signature) const {
+ std::string* out_signature) const {
bssl::ScopedEVP_MD_CTX md_ctx;
if (EVP_DigestSignInit(md_ctx.get(), nullptr, EVP_sha256(), nullptr,
ecdsa_key_.get()) != 1) {
@@ -87,12 +87,12 @@
}
*out_signature =
- QuicString(reinterpret_cast<char*>(signature.get()), kSignatureLength);
+ std::string(reinterpret_cast<char*>(signature.get()), kSignatureLength);
return true;
}
-QuicString TestChannelIDKey::SerializeKey() const {
+std::string TestChannelIDKey::SerializeKey() const {
// i2d_PublicKey will produce an ANSI X9.62 public key which, for a P-256
// key, is 0x04 (meaning uncompressed) followed by the x and y field
// elements as 32-byte, big-endian numbers.
@@ -107,13 +107,13 @@
uint8_t* derp = buf;
i2d_PublicKey(ecdsa_key_.get(), &derp);
- return QuicString(reinterpret_cast<char*>(buf + 1), kExpectedKeyLength - 1);
+ return std::string(reinterpret_cast<char*>(buf + 1), kExpectedKeyLength - 1);
}
TestChannelIDSource::~TestChannelIDSource() {}
QuicAsyncStatus TestChannelIDSource::GetChannelIDKey(
- const QuicString& hostname,
+ const std::string& hostname,
std::unique_ptr<ChannelIDKey>* channel_id_key,
ChannelIDSourceCallback* /*callback*/) {
*channel_id_key = QuicMakeUnique<TestChannelIDKey>(HostnameToKey(hostname));
@@ -121,7 +121,7 @@
}
// static
-EVP_PKEY* TestChannelIDSource::HostnameToKey(const QuicString& hostname) {
+EVP_PKEY* TestChannelIDSource::HostnameToKey(const std::string& hostname) {
// In order to generate a deterministic key for a given hostname the
// hostname is hashed with SHA-256 and the resulting digest is treated as a
// big-endian number. The most-significant bit is cleared to ensure that
@@ -217,7 +217,7 @@
~AsyncTestChannelIDSource() override {}
// ChannelIDSource implementation.
- QuicAsyncStatus GetChannelIDKey(const QuicString& hostname,
+ QuicAsyncStatus GetChannelIDKey(const std::string& hostname,
std::unique_ptr<ChannelIDKey>* channel_id_key,
ChannelIDSourceCallback* callback) override {
// Synchronous mode.
@@ -323,7 +323,7 @@
: generator_(generator) {}
void Run(
QuicErrorCode error,
- const QuicString& error_details,
+ const std::string& error_details,
std::unique_ptr<CryptoHandshakeMessage> message,
std::unique_ptr<DiversificationNonce> diversification_nonce,
std::unique_ptr<ProofSource::Details> proof_source_details) override {
@@ -588,10 +588,10 @@
return std::make_pair(client_i, server_i);
}
-QuicString GetValueForTag(const CryptoHandshakeMessage& message, QuicTag tag) {
+std::string GetValueForTag(const CryptoHandshakeMessage& message, QuicTag tag) {
auto it = message.tag_value_map().find(tag);
if (it == message.tag_value_map().end()) {
- return QuicString();
+ return std::string();
}
return it->second;
}
@@ -681,7 +681,7 @@
}
private:
- const QuicString cert_;
+ const std::string cert_;
const uint64_t hash_;
const uint32_t index_;
};
@@ -782,10 +782,10 @@
const char kSampleLabel[] = "label";
const char kSampleContext[] = "context";
const size_t kSampleOutputLength = 32;
- QuicString client_key_extraction;
- QuicString server_key_extraction;
- QuicString client_tb_ekm;
- QuicString server_tb_ekm;
+ std::string client_key_extraction;
+ std::string server_key_extraction;
+ std::string client_tb_ekm;
+ std::string server_tb_ekm;
EXPECT_TRUE(client->ExportKeyingMaterial(kSampleLabel, kSampleContext,
kSampleOutputLength,
&client_key_extraction));
@@ -876,12 +876,12 @@
}
CryptoHandshakeMessage CreateCHLO(
- std::vector<std::pair<QuicString, QuicString>> tags_and_values) {
+ std::vector<std::pair<std::string, std::string>> tags_and_values) {
return CreateCHLO(tags_and_values, -1);
}
CryptoHandshakeMessage CreateCHLO(
- std::vector<std::pair<QuicString, QuicString>> tags_and_values,
+ std::vector<std::pair<std::string, std::string>> tags_and_values,
int minimum_size_bytes) {
CryptoHandshakeMessage msg;
msg.set_tag(MakeQuicTag('C', 'H', 'L', 'O'));
@@ -891,15 +891,15 @@
}
for (const auto& tag_and_value : tags_and_values) {
- const QuicString& tag = tag_and_value.first;
- const QuicString& value = tag_and_value.second;
+ const std::string& tag = tag_and_value.first;
+ const std::string& value = tag_and_value.second;
const QuicTag quic_tag = ParseTag(tag.c_str());
size_t value_len = value.length();
if (value_len > 0 && value[0] == '#') {
// This is ascii encoded hex.
- QuicString hex_value =
+ std::string hex_value =
QuicTextUtils::HexDecode(QuicStringPiece(&value[1]));
msg.SetStringPiece(quic_tag, hex_value);
continue;
@@ -997,8 +997,8 @@
// clang-format on
}
-QuicString GenerateClientNonceHex(const QuicClock* clock,
- QuicCryptoServerConfig* crypto_config) {
+std::string GenerateClientNonceHex(const QuicClock* clock,
+ QuicCryptoServerConfig* crypto_config) {
QuicCryptoServerConfig::ConfigOptions old_config_options;
QuicCryptoServerConfig::ConfigOptions new_config_options;
old_config_options.id = "old-config-id";
@@ -1012,13 +1012,13 @@
crypto_config->AddConfig(std::move(primary_config), clock->WallNow()));
QuicStringPiece orbit;
CHECK(msg->GetStringPiece(kORBT, &orbit));
- QuicString nonce;
+ std::string nonce;
CryptoUtils::GenerateNonce(clock->WallNow(), QuicRandom::GetInstance(), orbit,
&nonce);
return ("#" + QuicTextUtils::HexEncode(nonce));
}
-QuicString GenerateClientPublicValuesHex() {
+std::string GenerateClientPublicValuesHex() {
char public_value[32];
memset(public_value, 42, sizeof(public_value));
return ("#" + QuicTextUtils::HexEncode(public_value, sizeof(public_value)));
diff --git a/quic/test_tools/crypto_test_utils.h b/quic/test_tools/crypto_test_utils.h
index 8421895..0afb2aa 100644
--- a/quic/test_tools/crypto_test_utils.h
+++ b/quic/test_tools/crypto_test_utils.h
@@ -47,9 +47,9 @@
// ChannelIDKey implementation.
bool Sign(QuicStringPiece signed_data,
- QuicString* out_signature) const override;
+ std::string* out_signature) const override;
- QuicString SerializeKey() const override;
+ std::string SerializeKey() const override;
private:
bssl::UniquePtr<EVP_PKEY> ecdsa_key_;
@@ -62,12 +62,12 @@
// ChannelIDSource implementation.
QuicAsyncStatus GetChannelIDKey(
- const QuicString& hostname,
+ const std::string& hostname,
std::unique_ptr<ChannelIDKey>* channel_id_key,
ChannelIDSourceCallback* /*callback*/) override;
private:
- static EVP_PKEY* HostnameToKey(const QuicString& hostname);
+ static EVP_PKEY* HostnameToKey(const std::string& hostname);
};
namespace crypto_test_utils {
@@ -176,7 +176,7 @@
size_t server_i);
// Returns the value for the tag |tag| in the tag value map of |message|.
-QuicString GetValueForTag(const CryptoHandshakeMessage& message, QuicTag tag);
+std::string GetValueForTag(const CryptoHandshakeMessage& message, QuicTag tag);
// Returns a new |ProofSource| that serves up test certificates.
std::unique_ptr<ProofSource> ProofSourceForTesting();
@@ -218,9 +218,9 @@
// {"SNI", "www.example.com"}},
// optional_minimum_size_bytes);
CryptoHandshakeMessage CreateCHLO(
- std::vector<std::pair<QuicString, QuicString>> tags_and_values);
+ std::vector<std::pair<std::string, std::string>> tags_and_values);
CryptoHandshakeMessage CreateCHLO(
- std::vector<std::pair<QuicString, QuicString>> tags_and_values,
+ std::vector<std::pair<std::string, std::string>> tags_and_values,
int minimum_size_bytes);
// ChannelIDSourceForTesting returns a ChannelIDSource that generates keys
@@ -262,11 +262,11 @@
QuicCryptoServerStream* server);
// Return a CHLO nonce in hexadecimal.
-QuicString GenerateClientNonceHex(const QuicClock* clock,
- QuicCryptoServerConfig* crypto_config);
+std::string GenerateClientNonceHex(const QuicClock* clock,
+ QuicCryptoServerConfig* crypto_config);
// Return a CHLO PUBS in hexadecimal.
-QuicString GenerateClientPublicValuesHex();
+std::string GenerateClientPublicValuesHex();
} // namespace crypto_test_utils
diff --git a/quic/test_tools/crypto_test_utils_test.cc b/quic/test_tools/crypto_test_utils_test.cc
index cecdaa2..19fdfbb 100644
--- a/quic/test_tools/crypto_test_utils_test.cc
+++ b/quic/test_tools/crypto_test_utils_test.cc
@@ -73,7 +73,7 @@
: shlo_verifier_(shlo_verifier) {}
void Run(
QuicErrorCode error,
- const QuicString& error_details,
+ const std::string& error_details,
std::unique_ptr<CryptoHandshakeMessage> message,
std::unique_ptr<DiversificationNonce> diversification_nonce,
std::unique_ptr<ProofSource::Details> proof_source_details) override {
@@ -135,14 +135,14 @@
crypto_config.AddConfig(std::move(primary_config), clock.WallNow()));
QuicStringPiece orbit;
ASSERT_TRUE(msg->GetStringPiece(kORBT, &orbit));
- QuicString nonce;
+ std::string nonce;
CryptoUtils::GenerateNonce(clock.WallNow(), QuicRandom::GetInstance(), orbit,
&nonce);
- QuicString nonce_hex = "#" + QuicTextUtils::HexEncode(nonce);
+ std::string nonce_hex = "#" + QuicTextUtils::HexEncode(nonce);
char public_value[32];
memset(public_value, 42, sizeof(public_value));
- QuicString pub_hex =
+ std::string pub_hex =
"#" + QuicTextUtils::HexEncode(public_value, sizeof(public_value));
QuicTransportVersion version(AllSupportedTransportVersions().front());
diff --git a/quic/test_tools/failing_proof_source.cc b/quic/test_tools/failing_proof_source.cc
index 2db5717..339b793 100644
--- a/quic/test_tools/failing_proof_source.cc
+++ b/quic/test_tools/failing_proof_source.cc
@@ -8,8 +8,8 @@
namespace test {
void FailingProofSource::GetProof(const QuicSocketAddress& server_address,
- const QuicString& hostname,
- const QuicString& server_config,
+ const std::string& hostname,
+ const std::string& server_config,
QuicTransportVersion transport_version,
QuicStringPiece chlo_hash,
std::unique_ptr<Callback> callback) {
@@ -18,13 +18,13 @@
QuicReferenceCountedPointer<ProofSource::Chain>
FailingProofSource::GetCertChain(const QuicSocketAddress& server_address,
- const QuicString& hostname) {
+ const std::string& hostname) {
return QuicReferenceCountedPointer<Chain>();
}
void FailingProofSource::ComputeTlsSignature(
const QuicSocketAddress& server_address,
- const QuicString& hostname,
+ const std::string& hostname,
uint16_t signature_algorithm,
QuicStringPiece in,
std::unique_ptr<SignatureCallback> callback) {
diff --git a/quic/test_tools/failing_proof_source.h b/quic/test_tools/failing_proof_source.h
index 4427c4c..10f9971 100644
--- a/quic/test_tools/failing_proof_source.h
+++ b/quic/test_tools/failing_proof_source.h
@@ -14,19 +14,19 @@
class FailingProofSource : public ProofSource {
public:
void GetProof(const QuicSocketAddress& server_address,
- const QuicString& hostname,
- const QuicString& server_config,
+ const std::string& hostname,
+ const std::string& server_config,
QuicTransportVersion transport_version,
QuicStringPiece chlo_hash,
std::unique_ptr<Callback> callback) override;
QuicReferenceCountedPointer<Chain> GetCertChain(
const QuicSocketAddress& server_address,
- const QuicString& hostname) override;
+ const std::string& hostname) override;
void ComputeTlsSignature(
const QuicSocketAddress& server_address,
- const QuicString& hostname,
+ const std::string& hostname,
uint16_t signature_algorithm,
QuicStringPiece in,
std::unique_ptr<SignatureCallback> callback) override;
diff --git a/quic/test_tools/fake_proof_source.cc b/quic/test_tools/fake_proof_source.cc
index 3a02cd5..8f1cd37 100644
--- a/quic/test_tools/fake_proof_source.cc
+++ b/quic/test_tools/fake_proof_source.cc
@@ -20,10 +20,10 @@
FakeProofSource::GetProofOp::GetProofOp(
const QuicSocketAddress& server_addr,
- QuicString hostname,
- QuicString server_config,
+ std::string hostname,
+ std::string server_config,
QuicTransportVersion transport_version,
- QuicString chlo_hash,
+ std::string chlo_hash,
std::unique_ptr<ProofSource::Callback> callback,
ProofSource* delegate)
: server_address_(server_addr),
@@ -44,7 +44,7 @@
FakeProofSource::ComputeSignatureOp::ComputeSignatureOp(
const QuicSocketAddress& server_address,
- QuicString hostname,
+ std::string hostname,
uint16_t sig_alg,
QuicStringPiece in,
std::unique_ptr<ProofSource::SignatureCallback> callback,
@@ -69,8 +69,8 @@
void FakeProofSource::GetProof(
const QuicSocketAddress& server_address,
- const QuicString& hostname,
- const QuicString& server_config,
+ const std::string& hostname,
+ const std::string& server_config,
QuicTransportVersion transport_version,
QuicStringPiece chlo_hash,
std::unique_ptr<ProofSource::Callback> callback) {
@@ -82,18 +82,18 @@
pending_ops_.push_back(QuicMakeUnique<GetProofOp>(
server_address, hostname, server_config, transport_version,
- QuicString(chlo_hash), std::move(callback), delegate_.get()));
+ std::string(chlo_hash), std::move(callback), delegate_.get()));
}
QuicReferenceCountedPointer<ProofSource::Chain> FakeProofSource::GetCertChain(
const QuicSocketAddress& server_address,
- const QuicString& hostname) {
+ const std::string& hostname) {
return delegate_->GetCertChain(server_address, hostname);
}
void FakeProofSource::ComputeTlsSignature(
const QuicSocketAddress& server_address,
- const QuicString& hostname,
+ const std::string& hostname,
uint16_t signature_algorithm,
QuicStringPiece in,
std::unique_ptr<ProofSource::SignatureCallback> callback) {
diff --git a/quic/test_tools/fake_proof_source.h b/quic/test_tools/fake_proof_source.h
index 27f63a3..62c3b29 100644
--- a/quic/test_tools/fake_proof_source.h
+++ b/quic/test_tools/fake_proof_source.h
@@ -32,17 +32,17 @@
// ProofSource interface
void GetProof(const QuicSocketAddress& server_address,
- const QuicString& hostname,
- const QuicString& server_config,
+ const std::string& hostname,
+ const std::string& server_config,
QuicTransportVersion transport_version,
QuicStringPiece chlo_hash,
std::unique_ptr<ProofSource::Callback> callback) override;
QuicReferenceCountedPointer<Chain> GetCertChain(
const QuicSocketAddress& server_address,
- const QuicString& hostname) override;
+ const std::string& hostname) override;
void ComputeTlsSignature(
const QuicSocketAddress& server_address,
- const QuicString& hostname,
+ const std::string& hostname,
uint16_t signature_algorithm,
QuicStringPiece in,
std::unique_ptr<ProofSource::SignatureCallback> callback) override;
@@ -67,10 +67,10 @@
class GetProofOp : public PendingOp {
public:
GetProofOp(const QuicSocketAddress& server_addr,
- QuicString hostname,
- QuicString server_config,
+ std::string hostname,
+ std::string server_config,
QuicTransportVersion transport_version,
- QuicString chlo_hash,
+ std::string chlo_hash,
std::unique_ptr<ProofSource::Callback> callback,
ProofSource* delegate);
~GetProofOp() override;
@@ -79,10 +79,10 @@
private:
QuicSocketAddress server_address_;
- QuicString hostname_;
- QuicString server_config_;
+ std::string hostname_;
+ std::string server_config_;
QuicTransportVersion transport_version_;
- QuicString chlo_hash_;
+ std::string chlo_hash_;
std::unique_ptr<ProofSource::Callback> callback_;
ProofSource* delegate_;
};
@@ -90,7 +90,7 @@
class ComputeSignatureOp : public PendingOp {
public:
ComputeSignatureOp(const QuicSocketAddress& server_address,
- QuicString hostname,
+ std::string hostname,
uint16_t sig_alg,
QuicStringPiece in,
std::unique_ptr<ProofSource::SignatureCallback> callback,
@@ -101,9 +101,9 @@
private:
QuicSocketAddress server_address_;
- QuicString hostname_;
+ std::string hostname_;
uint16_t sig_alg_;
- QuicString in_;
+ std::string in_;
std::unique_ptr<ProofSource::SignatureCallback> callback_;
ProofSource* delegate_;
};
diff --git a/quic/test_tools/mock_quic_client_promised_info.cc b/quic/test_tools/mock_quic_client_promised_info.cc
index 4400b03..5b78104 100644
--- a/quic/test_tools/mock_quic_client_promised_info.cc
+++ b/quic/test_tools/mock_quic_client_promised_info.cc
@@ -10,7 +10,7 @@
MockQuicClientPromisedInfo::MockQuicClientPromisedInfo(
QuicSpdyClientSessionBase* session,
QuicStreamId id,
- QuicString url)
+ std::string url)
: QuicClientPromisedInfo(session, id, url) {}
MockQuicClientPromisedInfo::~MockQuicClientPromisedInfo() {}
diff --git a/quic/test_tools/mock_quic_client_promised_info.h b/quic/test_tools/mock_quic_client_promised_info.h
index a157ac5..5b718c0 100644
--- a/quic/test_tools/mock_quic_client_promised_info.h
+++ b/quic/test_tools/mock_quic_client_promised_info.h
@@ -19,7 +19,7 @@
public:
MockQuicClientPromisedInfo(QuicSpdyClientSessionBase* session,
QuicStreamId id,
- QuicString url);
+ std::string url);
~MockQuicClientPromisedInfo() override;
MOCK_METHOD2(HandleClientRequest,
diff --git a/quic/test_tools/mock_quic_session_visitor.h b/quic/test_tools/mock_quic_session_visitor.h
index fb01da6..31f4eaa 100644
--- a/quic/test_tools/mock_quic_session_visitor.h
+++ b/quic/test_tools/mock_quic_session_visitor.h
@@ -22,7 +22,7 @@
MOCK_METHOD4(OnConnectionClosed,
void(QuicConnectionId connection_id,
QuicErrorCode error,
- const QuicString& error_details,
+ const std::string& error_details,
ConnectionCloseSource source));
MOCK_METHOD1(OnWriteBlocked,
void(QuicBlockedWriterInterface* blocked_writer));
@@ -48,7 +48,7 @@
const QuicSocketAddress& client_address,
const QuicSocketAddress& peer_address,
const QuicSocketAddress& self_address,
- QuicString* error_details));
+ std::string* error_details));
};
} // namespace test
diff --git a/quic/test_tools/packet_dropping_test_writer.h b/quic/test_tools/packet_dropping_test_writer.h
index 9537944..2843979 100644
--- a/quic/test_tools/packet_dropping_test_writer.h
+++ b/quic/test_tools/packet_dropping_test_writer.h
@@ -141,7 +141,7 @@
DelayedWrite& operator=(DelayedWrite&&) = default;
~DelayedWrite();
- QuicString buffer;
+ std::string buffer;
QuicIpAddress self_address;
QuicSocketAddress peer_address;
std::unique_ptr<PerPacketOptions> options;
diff --git a/quic/test_tools/packet_reordering_writer.cc b/quic/test_tools/packet_reordering_writer.cc
index a8385d8..5fa5659 100644
--- a/quic/test_tools/packet_reordering_writer.cc
+++ b/quic/test_tools/packet_reordering_writer.cc
@@ -33,7 +33,7 @@
}
// Still have packet to wait.
DCHECK_LT(0u, num_packets_to_wait_) << "Only allow one packet to be delayed";
- delayed_data_ = QuicString(buffer, buf_len);
+ delayed_data_ = std::string(buffer, buf_len);
delayed_self_address_ = self_address;
delayed_peer_address_ = peer_address;
if (options != nullptr) {
diff --git a/quic/test_tools/packet_reordering_writer.h b/quic/test_tools/packet_reordering_writer.h
index ec49269..31cbd80 100644
--- a/quic/test_tools/packet_reordering_writer.h
+++ b/quic/test_tools/packet_reordering_writer.h
@@ -33,7 +33,7 @@
private:
bool delay_next_ = false;
size_t num_packets_to_wait_ = 0;
- QuicString delayed_data_;
+ std::string delayed_data_;
QuicIpAddress delayed_self_address_;
QuicSocketAddress delayed_peer_address_;
std::unique_ptr<PerPacketOptions> delayed_options_;
diff --git a/quic/test_tools/quic_crypto_server_config_peer.cc b/quic/test_tools/quic_crypto_server_config_peer.cc
index 048e6bb..be2d338 100644
--- a/quic/test_tools/quic_crypto_server_config_peer.cc
+++ b/quic/test_tools/quic_crypto_server_config_peer.cc
@@ -19,7 +19,7 @@
}
QuicReferenceCountedPointer<QuicCryptoServerConfig::Config>
-QuicCryptoServerConfigPeer::GetConfig(QuicString config_id) {
+QuicCryptoServerConfigPeer::GetConfig(std::string config_id) {
QuicReaderMutexLock locked(&server_config_->configs_lock_);
if (config_id == "<primary>") {
return QuicReferenceCountedPointer<QuicCryptoServerConfig::Config>(
@@ -38,8 +38,8 @@
server_config_->proof_source_ = std::move(proof_source);
}
-QuicString QuicCryptoServerConfigPeer::NewSourceAddressToken(
- QuicString config_id,
+std::string QuicCryptoServerConfigPeer::NewSourceAddressToken(
+ std::string config_id,
SourceAddressTokens previous_tokens,
const QuicIpAddress& ip,
QuicRandom* rand,
@@ -51,7 +51,7 @@
}
HandshakeFailureReason QuicCryptoServerConfigPeer::ValidateSourceAddressTokens(
- QuicString config_id,
+ std::string config_id,
QuicStringPiece srct,
const QuicIpAddress& ip,
QuicWallTime now,
@@ -84,7 +84,7 @@
}
void QuicCryptoServerConfigPeer::CheckConfigs(
- std::vector<std::pair<QuicString, bool>> expected_ids_and_status) {
+ std::vector<std::pair<std::string, bool>> expected_ids_and_status) {
QuicReaderMutexLock locked(&server_config_->configs_lock_);
ASSERT_EQ(expected_ids_and_status.size(), server_config_->configs_.size())
@@ -109,14 +109,14 @@
}
}
-// ConfigsDebug returns a QuicString that contains debugging information about
+// ConfigsDebug returns a std::string that contains debugging information about
// the set of Configs loaded in |server_config_| and their status.
-QuicString QuicCryptoServerConfigPeer::ConfigsDebug() {
+std::string QuicCryptoServerConfigPeer::ConfigsDebug() {
if (server_config_->configs_.empty()) {
return "No Configs in QuicCryptoServerConfig";
}
- QuicString s;
+ std::string s;
for (const auto& i : server_config_->configs_) {
const QuicReferenceCountedPointer<QuicCryptoServerConfig::Config> config =
@@ -139,11 +139,11 @@
QuicWallTime::FromUNIXSeconds(seconds));
}
-QuicString QuicCryptoServerConfigPeer::CompressChain(
+std::string QuicCryptoServerConfigPeer::CompressChain(
QuicCompressedCertsCache* compressed_certs_cache,
const QuicReferenceCountedPointer<ProofSource::Chain>& chain,
- const QuicString& client_common_set_hashes,
- const QuicString& client_cached_cert_hashes,
+ const std::string& client_common_set_hashes,
+ const std::string& client_cached_cert_hashes,
const CommonCertSets* common_sets) {
return QuicCryptoServerConfig::CompressChain(
compressed_certs_cache, chain, client_common_set_hashes,
diff --git a/quic/test_tools/quic_crypto_server_config_peer.h b/quic/test_tools/quic_crypto_server_config_peer.h
index 0034c4b..3f5a984 100644
--- a/quic/test_tools/quic_crypto_server_config_peer.h
+++ b/quic/test_tools/quic_crypto_server_config_peer.h
@@ -23,7 +23,7 @@
// Returns the config associated with |config_id|.
QuicReferenceCountedPointer<QuicCryptoServerConfig::Config> GetConfig(
- QuicString config_id);
+ std::string config_id);
// Returns a pointer to the ProofSource object.
ProofSource* GetProofSource() const;
@@ -32,8 +32,8 @@
void ResetProofSource(std::unique_ptr<ProofSource> proof_source);
// Generates a new valid source address token.
- QuicString NewSourceAddressToken(
- QuicString config_id,
+ std::string NewSourceAddressToken(
+ std::string config_id,
SourceAddressTokens previous_tokens,
const QuicIpAddress& ip,
QuicRandom* rand,
@@ -42,7 +42,7 @@
// Attempts to validate the tokens in |tokens|.
HandshakeFailureReason ValidateSourceAddressTokens(
- QuicString config_id,
+ std::string config_id,
QuicStringPiece tokens,
const QuicIpAddress& ip,
QuicWallTime now,
@@ -70,18 +70,18 @@
void CheckConfigs(
std::vector<std::pair<ServerConfigID, bool>> expected_ids_and_status);
- // ConfigsDebug returns a QuicString that contains debugging information about
- // the set of Configs loaded in |server_config_| and their status.
- QuicString ConfigsDebug()
+ // ConfigsDebug returns a std::string that contains debugging information
+ // about the set of Configs loaded in |server_config_| and their status.
+ std::string ConfigsDebug()
SHARED_LOCKS_REQUIRED(server_config_->configs_lock_);
void SelectNewPrimaryConfig(int seconds);
- static QuicString CompressChain(
+ static std::string CompressChain(
QuicCompressedCertsCache* compressed_certs_cache,
const QuicReferenceCountedPointer<ProofSource::Chain>& chain,
- const QuicString& client_common_set_hashes,
- const QuicString& client_cached_cert_hashes,
+ const std::string& client_common_set_hashes,
+ const std::string& client_cached_cert_hashes,
const CommonCertSets* common_sets);
uint32_t source_address_token_future_secs();
diff --git a/quic/test_tools/quic_stream_sequencer_buffer_peer.cc b/quic/test_tools/quic_stream_sequencer_buffer_peer.cc
index 9c96c82..36d2b04 100644
--- a/quic/test_tools/quic_stream_sequencer_buffer_peer.cc
+++ b/quic/test_tools/quic_stream_sequencer_buffer_peer.cc
@@ -27,7 +27,7 @@
iovec dest;
dest.iov_base = dest_buffer, dest.iov_len = size;
size_t bytes_read;
- QuicString error_details;
+ std::string error_details;
EXPECT_EQ(QUIC_NO_ERROR,
buffer_->Readv(&dest, 1, &bytes_read, &error_details));
return bytes_read;
diff --git a/quic/test_tools/quic_test_client.cc b/quic/test_tools/quic_test_client.cc
index a0068d5..fb76f7a 100644
--- a/quic/test_tools/quic_test_client.cc
+++ b/quic/test_tools/quic_test_client.cc
@@ -44,16 +44,16 @@
// ProofVerifier interface.
QuicAsyncStatus VerifyProof(
- const QuicString& hostname,
+ const std::string& hostname,
const uint16_t port,
- const QuicString& server_config,
+ const std::string& server_config,
QuicTransportVersion transport_version,
QuicStringPiece chlo_hash,
- const std::vector<QuicString>& certs,
- const QuicString& cert_sct,
- const QuicString& signature,
+ const std::vector<std::string>& certs,
+ const std::string& cert_sct,
+ const std::string& signature,
const ProofVerifyContext* context,
- QuicString* error_details,
+ std::string* error_details,
std::unique_ptr<ProofVerifyDetails>* details,
std::unique_ptr<ProofVerifierCallback> callback) override {
common_name_.clear();
@@ -90,10 +90,10 @@
}
QuicAsyncStatus VerifyCertChain(
- const QuicString& hostname,
- const std::vector<QuicString>& certs,
+ const std::string& hostname,
+ const std::vector<std::string>& certs,
const ProofVerifyContext* context,
- QuicString* error_details,
+ std::string* error_details,
std::unique_ptr<ProofVerifyDetails>* details,
std::unique_ptr<ProofVerifierCallback> callback) override {
return QUIC_SUCCESS;
@@ -103,14 +103,14 @@
return verifier_ != nullptr ? verifier_->CreateDefaultContext() : nullptr;
}
- const QuicString& common_name() const { return common_name_; }
+ const std::string& common_name() const { return common_name_; }
- const QuicString& cert_sct() const { return cert_sct_; }
+ const std::string& cert_sct() const { return cert_sct_; }
private:
std::unique_ptr<ProofVerifier> verifier_;
- QuicString common_name_;
- QuicString cert_sct_;
+ std::string common_name_;
+ std::string cert_sct_;
};
} // namespace
@@ -256,7 +256,7 @@
QuicTestClient::QuicTestClient(
QuicSocketAddress server_address,
- const QuicString& server_hostname,
+ const std::string& server_hostname,
const ParsedQuicVersionVector& supported_versions)
: QuicTestClient(server_address,
server_hostname,
@@ -265,7 +265,7 @@
QuicTestClient::QuicTestClient(
QuicSocketAddress server_address,
- const QuicString& server_hostname,
+ const std::string& server_hostname,
const QuicConfig& config,
const ParsedQuicVersionVector& supported_versions)
: client_(new MockableQuicClient(
@@ -279,7 +279,7 @@
QuicTestClient::QuicTestClient(
QuicSocketAddress server_address,
- const QuicString& server_hostname,
+ const std::string& server_hostname,
const QuicConfig& config,
const ParsedQuicVersionVector& supported_versions,
std::unique_ptr<ProofVerifier> proof_verifier)
@@ -316,11 +316,11 @@
}
}
-void QuicTestClient::SetUserAgentID(const QuicString& user_agent_id) {
+void QuicTestClient::SetUserAgentID(const std::string& user_agent_id) {
client_->SetUserAgentID(user_agent_id);
}
-ssize_t QuicTestClient::SendRequest(const QuicString& uri) {
+ssize_t QuicTestClient::SendRequest(const std::string& uri) {
spdy::SpdyHeaderBlock headers;
if (!PopulateHeaderBlockFromUrl(uri, &headers)) {
return 0;
@@ -328,7 +328,7 @@
return SendMessage(headers, "");
}
-ssize_t QuicTestClient::SendRequestAndRstTogether(const QuicString& uri) {
+ssize_t QuicTestClient::SendRequestAndRstTogether(const std::string& uri) {
spdy::SpdyHeaderBlock headers;
if (!PopulateHeaderBlockFromUrl(uri, &headers)) {
return 0;
@@ -346,8 +346,8 @@
}
void QuicTestClient::SendRequestsAndWaitForResponses(
- const std::vector<QuicString>& url_list) {
- for (const QuicString& url : url_list) {
+ const std::vector<std::string>& url_list) {
+ for (const std::string& url : url_list) {
SendRequest(url);
}
while (client()->WaitForEvents()) {
@@ -393,7 +393,7 @@
ret = stream->SendRequest(std::move(spdy_headers), body, fin);
++num_requests_;
} else {
- stream->WriteOrBufferBody(QuicString(body), fin);
+ stream->WriteOrBufferBody(std::string(body), fin);
ret = body.length();
}
if (GetQuicReloadableFlag(enable_quic_stateless_reject_support)) {
@@ -435,12 +435,12 @@
return ret;
}
-ssize_t QuicTestClient::SendData(const QuicString& data, bool last_data) {
+ssize_t QuicTestClient::SendData(const std::string& data, bool last_data) {
return SendData(data, last_data, nullptr);
}
ssize_t QuicTestClient::SendData(
- const QuicString& data,
+ const std::string& data,
bool last_data,
QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) {
return GetOrCreateStreamAndSendRequest(nullptr, QuicStringPiece(data),
@@ -463,13 +463,13 @@
buffer_body_ = buffer_body;
}
-const QuicString& QuicTestClient::response_body() const {
+const std::string& QuicTestClient::response_body() const {
return response_;
}
-QuicString QuicTestClient::SendCustomSynchronousRequest(
+std::string QuicTestClient::SendCustomSynchronousRequest(
const spdy::SpdyHeaderBlock& headers,
- const QuicString& body) {
+ const std::string& body) {
// Clear connection state here and only track this synchronous request.
ClearPerConnectionState();
if (SendMessage(headers, body) == 0) {
@@ -483,7 +483,7 @@
return response_;
}
-QuicString QuicTestClient::SendSynchronousRequest(const QuicString& uri) {
+std::string QuicTestClient::SendSynchronousRequest(const std::string& uri) {
spdy::SpdyHeaderBlock headers;
if (!PopulateHeaderBlockFromUrl(uri, &headers)) {
return "";
@@ -535,12 +535,12 @@
return client_.get();
}
-const QuicString& QuicTestClient::cert_common_name() const {
+const std::string& QuicTestClient::cert_common_name() const {
return reinterpret_cast<RecordingProofVerifier*>(client_->proof_verifier())
->common_name();
}
-const QuicString& QuicTestClient::cert_sct() const {
+const std::string& QuicTestClient::cert_sct() const {
return reinterpret_cast<RecordingProofVerifier*>(client_->proof_verifier())
->cert_sct();
}
@@ -637,7 +637,7 @@
}
ssize_t QuicTestClient::Send(const void* buffer, size_t size) {
- return SendData(QuicString(static_cast<const char*>(buffer), size), false);
+ return SendData(std::string(static_cast<const char*>(buffer), size), false);
}
bool QuicTestClient::response_headers_complete() const {
@@ -829,7 +829,7 @@
bool response_headers_complete,
const spdy::SpdyHeaderBlock& response_headers,
const spdy::SpdyHeaderBlock& preliminary_headers,
- const QuicString& response,
+ const std::string& response,
const spdy::SpdyHeaderBlock& response_trailers,
uint64_t bytes_read,
uint64_t bytes_written,
@@ -848,9 +848,9 @@
QuicTestClient::PerStreamState::~PerStreamState() = default;
bool QuicTestClient::PopulateHeaderBlockFromUrl(
- const QuicString& uri,
+ const std::string& uri,
spdy::SpdyHeaderBlock* headers) {
- QuicString url;
+ std::string url;
if (QuicTextUtils::StartsWith(uri, "https://") ||
QuicTextUtils::StartsWith(uri, "http://")) {
url = uri;
diff --git a/quic/test_tools/quic_test_client.h b/quic/test_tools/quic_test_client.h
index f9cc532..0967271 100644
--- a/quic/test_tools/quic_test_client.h
+++ b/quic/test_tools/quic_test_client.h
@@ -81,14 +81,14 @@
public QuicClientPushPromiseIndex::Delegate {
public:
QuicTestClient(QuicSocketAddress server_address,
- const QuicString& server_hostname,
+ const std::string& server_hostname,
const ParsedQuicVersionVector& supported_versions);
QuicTestClient(QuicSocketAddress server_address,
- const QuicString& server_hostname,
+ const std::string& server_hostname,
const QuicConfig& config,
const ParsedQuicVersionVector& supported_versions);
QuicTestClient(QuicSocketAddress server_address,
- const QuicString& server_hostname,
+ const std::string& server_hostname,
const QuicConfig& config,
const ParsedQuicVersionVector& supported_versions,
std::unique_ptr<ProofVerifier> proof_verifier);
@@ -96,25 +96,26 @@
~QuicTestClient() override;
// Sets the |user_agent_id| of the |client_|.
- void SetUserAgentID(const QuicString& user_agent_id);
+ void SetUserAgentID(const std::string& user_agent_id);
// Wraps data in a quic packet and sends it.
- ssize_t SendData(const QuicString& data, bool last_data);
+ ssize_t SendData(const std::string& data, bool last_data);
// As above, but |delegate| will be notified when |data| is ACKed.
ssize_t SendData(
- const QuicString& data,
+ const std::string& data,
bool last_data,
QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener);
// Clears any outstanding state and sends a simple GET of 'uri' to the
// server. Returns 0 if the request failed and no bytes were written.
- ssize_t SendRequest(const QuicString& uri);
+ ssize_t SendRequest(const std::string& uri);
// Send a request R and a RST_FRAME which resets R, in the same packet.
- ssize_t SendRequestAndRstTogether(const QuicString& uri);
+ ssize_t SendRequestAndRstTogether(const std::string& uri);
// Sends requests for all the urls and waits for the responses. To process
// the individual responses as they are returned, the caller should use the
// set the response_listener on the client().
- void SendRequestsAndWaitForResponses(const std::vector<QuicString>& url_list);
+ void SendRequestsAndWaitForResponses(
+ const std::vector<std::string>& url_list);
// Sends a request containing |headers| and |body| and returns the number of
// bytes sent (the size of the serialized request headers and body).
ssize_t SendMessage(const spdy::SpdyHeaderBlock& headers,
@@ -135,11 +136,11 @@
bool flush);
// Sends a request containing |headers| and |body|, waits for the response,
// and returns the response body.
- QuicString SendCustomSynchronousRequest(const spdy::SpdyHeaderBlock& headers,
- const QuicString& body);
+ std::string SendCustomSynchronousRequest(const spdy::SpdyHeaderBlock& headers,
+ const std::string& body);
// Sends a GET request for |uri|, waits for the response, and returns the
// response body.
- QuicString SendSynchronousRequest(const QuicString& uri);
+ std::string SendSynchronousRequest(const std::string& uri);
void SendConnectivityProbing();
void Connect();
void ResetConnection();
@@ -160,7 +161,7 @@
const spdy::SpdyHeaderBlock& response_trailers() const;
bool response_complete() const;
int64_t response_body_size() const;
- const QuicString& response_body() const;
+ const std::string& response_body() const;
// Group 2.
bool response_headers_complete() const;
const spdy::SpdyHeaderBlock* response_headers() const;
@@ -241,12 +242,12 @@
MockableQuicClient* client();
// cert_common_name returns the common name value of the server's certificate,
- // or the empty QuicString if no certificate was presented.
- const QuicString& cert_common_name() const;
+ // or the empty std::string if no certificate was presented.
+ const std::string& cert_common_name() const;
// cert_sct returns the signed timestamp of the server's certificate,
- // or the empty QuicString if no signed timestamp was presented.
- const QuicString& cert_sct() const;
+ // or the empty std::string if no signed timestamp was presented.
+ const std::string& cert_sct() const;
// Get the server config map.
QuicTagValueMap GetServerConfig() const;
@@ -273,7 +274,7 @@
// Explicitly set the SNI value for this client, overriding the default
// behavior which extracts the SNI value from the request URL.
- void OverrideSni(const QuicString& sni) {
+ void OverrideSni(const std::string& sni) {
override_sni_set_ = true;
override_sni_ = sni;
}
@@ -285,7 +286,7 @@
// Given |uri|, populates the fields in |headers| for a simple GET
// request. If |uri| is a relative URL, the QuicServerId will be
// use to specify the authority.
- bool PopulateHeaderBlockFromUrl(const QuicString& uri,
+ bool PopulateHeaderBlockFromUrl(const std::string& uri,
spdy::SpdyHeaderBlock* headers);
// Waits for a period of time that is long enough to receive all delayed acks
@@ -328,7 +329,7 @@
bool response_headers_complete,
const spdy::SpdyHeaderBlock& response_headers,
const spdy::SpdyHeaderBlock& preliminary_headers,
- const QuicString& response,
+ const std::string& response,
const spdy::SpdyHeaderBlock& response_trailers,
uint64_t bytes_read,
uint64_t bytes_written,
@@ -340,7 +341,7 @@
bool response_headers_complete;
spdy::SpdyHeaderBlock response_headers;
spdy::SpdyHeaderBlock preliminary_headers;
- QuicString response;
+ std::string response;
spdy::SpdyHeaderBlock response_trailers;
uint64_t bytes_read;
uint64_t bytes_written;
@@ -378,7 +379,7 @@
spdy::SpdyHeaderBlock response_trailers_;
spdy::SpdyPriority priority_;
- QuicString response_;
+ std::string response_;
// bytes_read_ and bytes_written_ are updated only when stream_ is released;
// prefer bytes_read() and bytes_written() member functions.
uint64_t bytes_read_;
@@ -403,7 +404,7 @@
// If set, this value is used for the connection SNI, overriding the usual
// logic which extracts the SNI from the request URL.
bool override_sni_set_ = false;
- QuicString override_sni_;
+ std::string override_sni_;
};
} // namespace test
diff --git a/quic/test_tools/quic_test_utils.cc b/quic/test_tools/quic_test_utils.cc
index 6e3c2a5..ca2d9ff 100644
--- a/quic/test_tools/quic_test_utils.cc
+++ b/quic/test_tools/quic_test_utils.cc
@@ -131,15 +131,15 @@
header.length_length);
}
-QuicString Sha1Hash(QuicStringPiece data) {
+std::string Sha1Hash(QuicStringPiece data) {
char buffer[SHA_DIGEST_LENGTH];
SHA1(reinterpret_cast<const uint8_t*>(data.data()), data.size(),
reinterpret_cast<uint8_t*>(buffer));
- return QuicString(buffer, QUIC_ARRAYSIZE(buffer));
+ return std::string(buffer, QUIC_ARRAYSIZE(buffer));
}
uint64_t SimpleRandom::RandUint64() {
- QuicString hash =
+ std::string hash =
Sha1Hash(QuicStringPiece(reinterpret_cast<char*>(&seed_), sizeof(seed_)));
DCHECK_EQ(static_cast<size_t>(SHA_DIGEST_LENGTH), hash.length());
memcpy(&seed_, hash.data(), sizeof(seed_));
@@ -650,7 +650,7 @@
TestQuicSpdyClientSession::~TestQuicSpdyClientSession() {}
-bool TestQuicSpdyClientSession::IsAuthorized(const QuicString& authority) {
+bool TestQuicSpdyClientSession::IsAuthorized(const std::string& authority) {
return true;
}
@@ -714,10 +714,10 @@
namespace {
-QuicString HexDumpWithMarks(const char* data,
- int length,
- const bool* marks,
- int mark_length) {
+std::string HexDumpWithMarks(const char* data,
+ int length,
+ const bool* marks,
+ int mark_length) {
static const char kHexChars[] = "0123456789abcdef";
static const int kColumns = 4;
@@ -728,7 +728,7 @@
mark_length = std::min(mark_length, kSizeLimit);
}
- QuicString hex;
+ std::string hex;
for (const char* row = data; length > 0;
row += kColumns, length -= kColumns) {
for (const char* p = row; p < row + 4; ++p) {
@@ -782,7 +782,7 @@
bool version_flag,
bool reset_flag,
uint64_t packet_number,
- const QuicString& data) {
+ const std::string& data) {
return ConstructEncryptedPacket(
destination_connection_id, source_connection_id, version_flag, reset_flag,
packet_number, data, CONNECTION_ID_PRESENT, CONNECTION_ID_ABSENT,
@@ -795,7 +795,7 @@
bool version_flag,
bool reset_flag,
uint64_t packet_number,
- const QuicString& data,
+ const std::string& data,
QuicConnectionIdIncluded destination_connection_id_included,
QuicConnectionIdIncluded source_connection_id_included,
QuicPacketNumberLength packet_number_length) {
@@ -811,7 +811,7 @@
bool version_flag,
bool reset_flag,
uint64_t packet_number,
- const QuicString& data,
+ const std::string& data,
QuicConnectionIdIncluded destination_connection_id_included,
QuicConnectionIdIncluded source_connection_id_included,
QuicPacketNumberLength packet_number_length,
@@ -828,7 +828,7 @@
bool version_flag,
bool reset_flag,
uint64_t packet_number,
- const QuicString& data,
+ const std::string& data,
QuicConnectionIdIncluded destination_connection_id_included,
QuicConnectionIdIncluded source_connection_id_included,
QuicPacketNumberLength packet_number_length,
@@ -894,7 +894,7 @@
bool version_flag,
bool reset_flag,
uint64_t packet_number,
- const QuicString& data,
+ const std::string& data,
QuicConnectionIdIncluded destination_connection_id_included,
QuicConnectionIdIncluded source_connection_id_included,
QuicPacketNumberLength packet_number_length,
@@ -939,7 +939,7 @@
return new QuicEncryptedPacket(buffer, encrypted_length, true);
}
-void CompareCharArraysWithHexError(const QuicString& description,
+void CompareCharArraysWithHexError(const std::string& description,
const char* actual,
const int actual_len,
const char* expected,
diff --git a/quic/test_tools/quic_test_utils.h b/quic/test_tools/quic_test_utils.h
index 2cca768..dc608d5 100644
--- a/quic/test_tools/quic_test_utils.h
+++ b/quic/test_tools/quic_test_utils.h
@@ -79,7 +79,7 @@
bool version_flag,
bool reset_flag,
uint64_t packet_number,
- const QuicString& data,
+ const std::string& data,
QuicConnectionIdIncluded destination_connection_id_included,
QuicConnectionIdIncluded source_connection_id_included,
QuicPacketNumberLength packet_number_length,
@@ -96,7 +96,7 @@
bool version_flag,
bool reset_flag,
uint64_t packet_number,
- const QuicString& data,
+ const std::string& data,
QuicConnectionIdIncluded destination_connection_id_included,
QuicConnectionIdIncluded source_connection_id_included,
QuicPacketNumberLength packet_number_length,
@@ -109,7 +109,7 @@
bool version_flag,
bool reset_flag,
uint64_t packet_number,
- const QuicString& data,
+ const std::string& data,
QuicConnectionIdIncluded destination_connection_id_included,
QuicConnectionIdIncluded source_connection_id_included,
QuicPacketNumberLength packet_number_length);
@@ -123,7 +123,7 @@
bool version_flag,
bool reset_flag,
uint64_t packet_number,
- const QuicString& data);
+ const std::string& data);
// Constructs a received packet for testing. The caller must take ownership of
// the returned pointer.
@@ -142,14 +142,14 @@
bool version_flag,
bool reset_flag,
uint64_t packet_number,
- const QuicString& data,
+ const std::string& data,
QuicConnectionIdIncluded destination_connection_id_included,
QuicConnectionIdIncluded source_connection_id_included,
QuicPacketNumberLength packet_number_length,
ParsedQuicVersionVector* versions,
Perspective perspective);
-void CompareCharArraysWithHexError(const QuicString& description,
+void CompareCharArraysWithHexError(const std::string& description,
const char* actual,
const int actual_len,
const char* expected,
@@ -220,8 +220,8 @@
const QuicFrames& frames,
size_t packet_size);
-// Compute SHA-1 hash of the supplied QuicString.
-QuicString Sha1Hash(QuicStringPiece data);
+// Compute SHA-1 hash of the supplied std::string.
+std::string Sha1Hash(QuicStringPiece data);
// Simple random number generator used to compute random numbers suitable
// for pseudo-randomly dropping packets in tests. It works by computing
@@ -371,7 +371,7 @@
MOCK_METHOD1(OnMessageReceived, void(QuicStringPiece message));
MOCK_METHOD3(OnConnectionClosed,
void(QuicErrorCode error,
- const QuicString& error_details,
+ const std::string& error_details,
ConnectionCloseSource source));
MOCK_METHOD0(OnWriteBlocked, void());
MOCK_METHOD0(OnCanWrite, void());
@@ -486,11 +486,11 @@
MOCK_METHOD1(SendConnectionClose, void(QuicErrorCode error));
MOCK_METHOD3(CloseConnection,
void(QuicErrorCode error,
- const QuicString& details,
+ const std::string& details,
ConnectionCloseBehavior connection_close_behavior));
MOCK_METHOD3(SendConnectionClosePacket,
void(QuicErrorCode error,
- const QuicString& details,
+ const std::string& details,
AckBundling ack_mode));
MOCK_METHOD3(SendRstStream,
void(QuicStreamId id,
@@ -499,7 +499,7 @@
MOCK_METHOD3(SendGoAway,
void(QuicErrorCode error,
QuicStreamId last_good_stream_id,
- const QuicString& reason));
+ const std::string& reason));
MOCK_METHOD1(SendBlocked, void(QuicStreamId id));
MOCK_METHOD2(SendWindowUpdate,
void(QuicStreamId id, QuicStreamOffset byte_offset));
@@ -520,7 +520,7 @@
MOCK_METHOD2(SendMessage, MessageStatus(QuicMessageId, QuicMemSliceSpan));
MOCK_METHOD3(OnConnectionClosed,
void(QuicErrorCode error,
- const QuicString& error_details,
+ const std::string& error_details,
ConnectionCloseSource source));
MOCK_METHOD1(OnError, void(QuicFramer* framer));
@@ -530,7 +530,7 @@
void ReallyCloseConnection(
QuicErrorCode error,
- const QuicString& details,
+ const std::string& details,
ConnectionCloseBehavior connection_close_behavior) {
QuicConnection::CloseConnection(error, details, connection_close_behavior);
}
@@ -608,7 +608,7 @@
MOCK_METHOD3(OnConnectionClosed,
void(QuicErrorCode error,
- const QuicString& error_details,
+ const std::string& error_details,
ConnectionCloseSource source));
MOCK_METHOD1(CreateIncomingStream, QuicStream*(QuicStreamId id));
MOCK_METHOD1(CreateIncomingStream, QuicSpdyStream*(PendingStream stream));
@@ -686,7 +686,7 @@
// From QuicSession.
MOCK_METHOD3(OnConnectionClosed,
void(QuicErrorCode error,
- const QuicString& error_details,
+ const std::string& error_details,
ConnectionCloseSource source));
MOCK_METHOD1(CreateIncomingStream, QuicSpdyStream*(QuicStreamId id));
MOCK_METHOD1(CreateIncomingStream, QuicSpdyStream*(PendingStream stream));
@@ -813,7 +813,7 @@
delete;
~TestQuicSpdyClientSession() override;
- bool IsAuthorized(const QuicString& authority) override;
+ bool IsAuthorized(const std::string& authority) override;
// QuicSpdyClientSessionBase
MOCK_METHOD1(OnProofValid,
@@ -912,7 +912,7 @@
MOCK_CONST_METHOD0(HasReliableBandwidthEstimate, bool());
MOCK_METHOD1(OnRttUpdated, void(QuicPacketNumber));
MOCK_CONST_METHOD0(GetCongestionWindow, QuicByteCount());
- MOCK_CONST_METHOD0(GetDebugState, QuicString());
+ MOCK_CONST_METHOD0(GetDebugState, std::string());
MOCK_CONST_METHOD0(InSlowStart, bool());
MOCK_CONST_METHOD0(InRecovery, bool());
MOCK_CONST_METHOD0(ShouldSendProbingPacket, bool());
@@ -1046,7 +1046,7 @@
MOCK_METHOD3(OnUnrecoverableError,
void(QuicErrorCode,
- const QuicString&,
+ const std::string&,
ConnectionCloseSource source));
};
@@ -1062,7 +1062,7 @@
MOCK_METHOD1(OnSerializedPacket, void(SerializedPacket* packet));
MOCK_METHOD3(OnUnrecoverableError,
void(QuicErrorCode,
- const QuicString&,
+ const std::string&,
ConnectionCloseSource source));
};
diff --git a/quic/test_tools/simple_quic_framer.cc b/quic/test_tools/simple_quic_framer.cc
index bf7184e..ca82c7c 100644
--- a/quic/test_tools/simple_quic_framer.cc
+++ b/quic/test_tools/simple_quic_framer.cc
@@ -59,8 +59,8 @@
bool OnStreamFrame(const QuicStreamFrame& frame) override {
// Save a copy of the data so it is valid after the packet is processed.
- QuicString* string_data =
- new QuicString(frame.data_buffer, frame.data_length);
+ std::string* string_data =
+ new std::string(frame.data_buffer, frame.data_length);
stream_data_.push_back(QuicWrapUnique(string_data));
// TODO(ianswett): A pointer isn't necessary with emplace_back.
stream_frames_.push_back(QuicMakeUnique<QuicStreamFrame>(
@@ -71,8 +71,8 @@
bool OnCryptoFrame(const QuicCryptoFrame& frame) override {
// Save a copy of the data so it is valid after the packet is processed.
- QuicString* string_data =
- new QuicString(frame.data_buffer, frame.data_length);
+ std::string* string_data =
+ new std::string(frame.data_buffer, frame.data_length);
crypto_data_.push_back(QuicWrapUnique(string_data));
crypto_frames_.push_back(QuicMakeUnique<QuicCryptoFrame>(
frame.level, frame.offset, QuicStringPiece(*string_data)));
@@ -284,8 +284,8 @@
std::vector<QuicRetireConnectionIdFrame> retire_connection_id_frames_;
std::vector<QuicNewTokenFrame> new_token_frames_;
std::vector<QuicMessageFrame> message_frames_;
- std::vector<std::unique_ptr<QuicString>> stream_data_;
- std::vector<std::unique_ptr<QuicString>> crypto_data_;
+ std::vector<std::unique_ptr<std::string>> stream_data_;
+ std::vector<std::unique_ptr<std::string>> crypto_data_;
EncryptionLevel last_decrypted_level_;
};
diff --git a/quic/test_tools/simulator/actor.cc b/quic/test_tools/simulator/actor.cc
index 546875d..578b894 100644
--- a/quic/test_tools/simulator/actor.cc
+++ b/quic/test_tools/simulator/actor.cc
@@ -8,7 +8,7 @@
namespace quic {
namespace simulator {
-Actor::Actor(Simulator* simulator, QuicString name)
+Actor::Actor(Simulator* simulator, std::string name)
: simulator_(simulator),
clock_(simulator->GetClock()),
name_(std::move(name)) {
diff --git a/quic/test_tools/simulator/actor.h b/quic/test_tools/simulator/actor.h
index 0c24913..9e06a7e 100644
--- a/quic/test_tools/simulator/actor.h
+++ b/quic/test_tools/simulator/actor.h
@@ -29,7 +29,7 @@
// will not be called again unless Schedule() is called.
class Actor {
public:
- Actor(Simulator* simulator, QuicString name);
+ Actor(Simulator* simulator, std::string name);
virtual ~Actor();
// Trigger all the events the actor can potentially handle at this point.
@@ -37,7 +37,7 @@
// to schedule the next call manually.
virtual void Act() = 0;
- inline QuicString name() const { return name_; }
+ inline std::string name() const { return name_; }
inline Simulator* simulator() const { return simulator_; }
protected:
@@ -49,7 +49,7 @@
Simulator* simulator_;
const QuicClock* clock_;
- QuicString name_;
+ std::string name_;
private:
// Since the Actor object registers itself with a simulator using a pointer to
diff --git a/quic/test_tools/simulator/alarm_factory.cc b/quic/test_tools/simulator/alarm_factory.cc
index 736f9ea..e748da5 100644
--- a/quic/test_tools/simulator/alarm_factory.cc
+++ b/quic/test_tools/simulator/alarm_factory.cc
@@ -15,7 +15,7 @@
class Alarm : public QuicAlarm {
public:
Alarm(Simulator* simulator,
- QuicString name,
+ std::string name,
QuicArenaScopedPtr<QuicAlarm::Delegate> delegate)
: QuicAlarm(std::move(delegate)), adapter_(simulator, name, this) {}
~Alarm() override {}
@@ -33,7 +33,7 @@
// interfaces.
class Adapter : public Actor {
public:
- Adapter(Simulator* simulator, QuicString name, Alarm* parent)
+ Adapter(Simulator* simulator, std::string name, Alarm* parent)
: Actor(simulator, name), parent_(parent) {}
~Adapter() override {}
@@ -51,12 +51,12 @@
Adapter adapter_;
};
-AlarmFactory::AlarmFactory(Simulator* simulator, QuicString name)
+AlarmFactory::AlarmFactory(Simulator* simulator, std::string name)
: simulator_(simulator), name_(std::move(name)), counter_(0) {}
AlarmFactory::~AlarmFactory() {}
-QuicString AlarmFactory::GetNewAlarmName() {
+std::string AlarmFactory::GetNewAlarmName() {
++counter_;
return QuicStringPrintf("%s (alarm %i)", name_.c_str(), counter_);
}
diff --git a/quic/test_tools/simulator/alarm_factory.h b/quic/test_tools/simulator/alarm_factory.h
index 535095a..d765175 100644
--- a/quic/test_tools/simulator/alarm_factory.h
+++ b/quic/test_tools/simulator/alarm_factory.h
@@ -14,7 +14,7 @@
// AlarmFactory allows to schedule QuicAlarms using the simulation event queue.
class AlarmFactory : public QuicAlarmFactory {
public:
- AlarmFactory(Simulator* simulator, QuicString name);
+ AlarmFactory(Simulator* simulator, std::string name);
AlarmFactory(const AlarmFactory&) = delete;
AlarmFactory& operator=(const AlarmFactory&) = delete;
~AlarmFactory() override;
@@ -26,10 +26,10 @@
private:
// Automatically generate a name for a new alarm.
- QuicString GetNewAlarmName();
+ std::string GetNewAlarmName();
Simulator* simulator_;
- QuicString name_;
+ std::string name_;
int counter_;
};
diff --git a/quic/test_tools/simulator/link.cc b/quic/test_tools/simulator/link.cc
index 879de26..a016b89 100644
--- a/quic/test_tools/simulator/link.cc
+++ b/quic/test_tools/simulator/link.cc
@@ -14,7 +14,7 @@
const uint64_t kMaxRandomDelayUs = 10;
OneWayLink::OneWayLink(Simulator* simulator,
- QuicString name,
+ std::string name,
UnconstrainedPortInterface* sink,
QuicBandwidth bandwidth,
QuicTime::Delta propagation_delay)
@@ -85,7 +85,7 @@
}
SymmetricLink::SymmetricLink(Simulator* simulator,
- QuicString name,
+ std::string name,
UnconstrainedPortInterface* sink_a,
UnconstrainedPortInterface* sink_b,
QuicBandwidth bandwidth,
diff --git a/quic/test_tools/simulator/link.h b/quic/test_tools/simulator/link.h
index 4553324..103afa0 100644
--- a/quic/test_tools/simulator/link.h
+++ b/quic/test_tools/simulator/link.h
@@ -20,7 +20,7 @@
class OneWayLink : public Actor, public ConstrainedPortInterface {
public:
OneWayLink(Simulator* simulator,
- QuicString name,
+ std::string name,
UnconstrainedPortInterface* sink,
QuicBandwidth bandwidth,
QuicTime::Delta propagation_delay);
@@ -66,7 +66,7 @@
class SymmetricLink {
public:
SymmetricLink(Simulator* simulator,
- QuicString name,
+ std::string name,
UnconstrainedPortInterface* sink_a,
UnconstrainedPortInterface* sink_b,
QuicBandwidth bandwidth,
diff --git a/quic/test_tools/simulator/packet_filter.cc b/quic/test_tools/simulator/packet_filter.cc
index 8ee038a..ad03903 100644
--- a/quic/test_tools/simulator/packet_filter.cc
+++ b/quic/test_tools/simulator/packet_filter.cc
@@ -8,7 +8,7 @@
namespace simulator {
PacketFilter::PacketFilter(Simulator* simulator,
- QuicString name,
+ std::string name,
Endpoint* input)
: Endpoint(simulator, name), input_(input) {
input_->SetTxPort(this);
diff --git a/quic/test_tools/simulator/packet_filter.h b/quic/test_tools/simulator/packet_filter.h
index e79b2cb..9873bec 100644
--- a/quic/test_tools/simulator/packet_filter.h
+++ b/quic/test_tools/simulator/packet_filter.h
@@ -39,7 +39,7 @@
public:
// Initialize the filter by wrapping around |input|. Does not take the
// ownership of |input|.
- PacketFilter(Simulator* simulator, QuicString name, Endpoint* input);
+ PacketFilter(Simulator* simulator, std::string name, Endpoint* input);
PacketFilter(const PacketFilter&) = delete;
PacketFilter& operator=(const PacketFilter&) = delete;
~PacketFilter() override;
diff --git a/quic/test_tools/simulator/port.cc b/quic/test_tools/simulator/port.cc
index 3db8888..242ebd4 100644
--- a/quic/test_tools/simulator/port.cc
+++ b/quic/test_tools/simulator/port.cc
@@ -14,7 +14,7 @@
Packet::Packet(const Packet& packet) = default;
-Endpoint::Endpoint(Simulator* simulator, QuicString name)
+Endpoint::Endpoint(Simulator* simulator, std::string name)
: Actor(simulator, name) {}
} // namespace simulator
diff --git a/quic/test_tools/simulator/port.h b/quic/test_tools/simulator/port.h
index 5cd4a7f..15da638 100644
--- a/quic/test_tools/simulator/port.h
+++ b/quic/test_tools/simulator/port.h
@@ -19,11 +19,11 @@
~Packet();
Packet(const Packet& packet);
- QuicString source;
- QuicString destination;
+ std::string source;
+ std::string destination;
QuicTime tx_timestamp;
- QuicString contents;
+ std::string contents;
QuicByteCount size;
};
@@ -57,7 +57,7 @@
virtual void SetTxPort(ConstrainedPortInterface* port) = 0;
protected:
- Endpoint(Simulator* simulator, QuicString name);
+ Endpoint(Simulator* simulator, std::string name);
};
} // namespace simulator
diff --git a/quic/test_tools/simulator/queue.cc b/quic/test_tools/simulator/queue.cc
index 4236481..3816fd4 100644
--- a/quic/test_tools/simulator/queue.cc
+++ b/quic/test_tools/simulator/queue.cc
@@ -12,7 +12,7 @@
Queue::ListenerInterface::~ListenerInterface() {}
-Queue::Queue(Simulator* simulator, QuicString name, QuicByteCount capacity)
+Queue::Queue(Simulator* simulator, std::string name, QuicByteCount capacity)
: Actor(simulator, name),
capacity_(capacity),
bytes_queued_(0),
diff --git a/quic/test_tools/simulator/queue.h b/quic/test_tools/simulator/queue.h
index f9fa483..6c3c6b0 100644
--- a/quic/test_tools/simulator/queue.h
+++ b/quic/test_tools/simulator/queue.h
@@ -23,7 +23,7 @@
virtual void OnPacketDequeued() = 0;
};
- Queue(Simulator* simulator, QuicString name, QuicByteCount capacity);
+ Queue(Simulator* simulator, std::string name, QuicByteCount capacity);
Queue(const Queue&) = delete;
Queue& operator=(const Queue&) = delete;
~Queue() override;
diff --git a/quic/test_tools/simulator/quic_endpoint.cc b/quic/test_tools/simulator/quic_endpoint.cc
index 1bacdf2..b0ce5ca 100644
--- a/quic/test_tools/simulator/quic_endpoint.cc
+++ b/quic/test_tools/simulator/quic_endpoint.cc
@@ -23,8 +23,8 @@
const char kStreamDataContents = 'Q';
// Takes a SHA-1 hash of the name and converts it into five 32-bit integers.
-static std::vector<uint32_t> HashNameIntoFive32BitIntegers(QuicString name) {
- const QuicString hash = test::Sha1Hash(name);
+static std::vector<uint32_t> HashNameIntoFive32BitIntegers(std::string name) {
+ const std::string hash = test::Sha1Hash(name);
std::vector<uint32_t> output;
uint32_t current_number = 0;
@@ -39,14 +39,14 @@
return output;
}
-QuicSocketAddress GetAddressFromName(QuicString name) {
+QuicSocketAddress GetAddressFromName(std::string name) {
const std::vector<uint32_t> hash = HashNameIntoFive32BitIntegers(name);
// Generate a random port between 1025 and 65535.
const uint16_t port = 1025 + hash[0] % (65535 - 1025 + 1);
// Generate a random 10.x.x.x address, where x is between 1 and 254.
- QuicString ip_address{"\xa\0\0\0", 4};
+ std::string ip_address{"\xa\0\0\0", 4};
for (size_t i = 1; i < 4; i++) {
ip_address[i] = 1 + hash[i] % 254;
}
@@ -56,8 +56,8 @@
}
QuicEndpoint::QuicEndpoint(Simulator* simulator,
- QuicString name,
- QuicString peer_name,
+ std::string name,
+ std::string peer_name,
Perspective perspective,
QuicConnectionId connection_id)
: Endpoint(simulator, name),
@@ -103,7 +103,7 @@
// primarily because
// - this enables pacing, and
// - this sets the non-handshake timeouts.
- QuicString error;
+ std::string error;
CryptoHandshakeMessage peer_hello;
peer_hello.SetValue(kICSL,
static_cast<uint32_t>(kMaximumIdleTimeoutSecs - 1));
@@ -122,7 +122,7 @@
const char* perspective_prefix =
connection_.perspective() == Perspective::IS_CLIENT ? "C" : "S";
- QuicString identifier =
+ std::string identifier =
QuicStrCat(perspective_prefix, connection_.connection_id().ToString());
QuicRecordTestOutput(identifier,
trace_visitor_->trace()->SerializeAsString());
@@ -305,7 +305,7 @@
packet->destination = endpoint_->peer_name_;
packet->tx_timestamp = endpoint_->clock_->Now();
- packet->contents = QuicString(buffer, buf_len);
+ packet->contents = std::string(buffer, buf_len);
packet->size = buf_len;
endpoint_->nic_tx_queue_.AcceptPacket(std::move(packet));
@@ -384,7 +384,7 @@
}
QuicEndpointMultiplexer::QuicEndpointMultiplexer(
- QuicString name,
+ std::string name,
std::initializer_list<QuicEndpoint*> endpoints)
: Endpoint((*endpoints.begin())->simulator(), name) {
for (QuicEndpoint* endpoint : endpoints) {
diff --git a/quic/test_tools/simulator/quic_endpoint.h b/quic/test_tools/simulator/quic_endpoint.h
index ab4ee4b..955ac8f 100644
--- a/quic/test_tools/simulator/quic_endpoint.h
+++ b/quic/test_tools/simulator/quic_endpoint.h
@@ -26,7 +26,7 @@
// Generate a random local network host-port tuple based on the name of the
// endpoint.
-QuicSocketAddress GetAddressFromName(QuicString name);
+QuicSocketAddress GetAddressFromName(std::string name);
// A QUIC connection endpoint. Wraps around QuicConnection. In order to
// initiate a transfer, the caller has to call AddBytesToTransfer(). The data
@@ -40,8 +40,8 @@
public SessionNotifierInterface {
public:
QuicEndpoint(Simulator* simulator,
- QuicString name,
- QuicString peer_name,
+ std::string name,
+ std::string peer_name,
Perspective perspective,
QuicConnectionId connection_id);
~QuicEndpoint() override;
@@ -92,7 +92,7 @@
void OnGoAway(const QuicGoAwayFrame& frame) override {}
void OnMessageReceived(QuicStringPiece message) override {}
void OnConnectionClosed(QuicErrorCode error,
- const QuicString& error_details,
+ const std::string& error_details,
ConnectionCloseSource source) override {}
void OnWriteBlocked() override {}
void OnSuccessfulVersionNegotiation(
@@ -176,7 +176,7 @@
// write-blocked.
void WriteStreamData();
- QuicString peer_name_;
+ std::string peer_name_;
Writer writer_;
DataProducer producer_;
@@ -210,7 +210,7 @@
class QuicEndpointMultiplexer : public Endpoint,
public UnconstrainedPortInterface {
public:
- QuicEndpointMultiplexer(QuicString name,
+ QuicEndpointMultiplexer(std::string name,
std::initializer_list<QuicEndpoint*> endpoints);
~QuicEndpointMultiplexer() override;
@@ -225,7 +225,7 @@
void Act() override {}
private:
- QuicUnorderedMap<QuicString, QuicEndpoint*> mapping_;
+ QuicUnorderedMap<std::string, QuicEndpoint*> mapping_;
};
} // namespace simulator
diff --git a/quic/test_tools/simulator/simulator.h b/quic/test_tools/simulator/simulator.h
index 0180dcb..e21dd50 100644
--- a/quic/test_tools/simulator/simulator.h
+++ b/quic/test_tools/simulator/simulator.h
@@ -130,7 +130,7 @@
// For each actor, maintain the time it is scheduled at. The value for
// unscheduled actors is QuicTime::Infinite().
QuicUnorderedMap<Actor*, QuicTime> scheduled_times_;
- QuicUnorderedSet<QuicString> actor_names_;
+ QuicUnorderedSet<std::string> actor_names_;
};
template <class TerminationPredicate>
diff --git a/quic/test_tools/simulator/simulator_test.cc b/quic/test_tools/simulator/simulator_test.cc
index d9986ad..33ad564 100644
--- a/quic/test_tools/simulator/simulator_test.cc
+++ b/quic/test_tools/simulator/simulator_test.cc
@@ -26,7 +26,7 @@
// A simple counter that increments its value by 1 every specified period.
class Counter : public Actor {
public:
- Counter(Simulator* simulator, QuicString name, QuicTime::Delta period)
+ Counter(Simulator* simulator, std::string name, QuicTime::Delta period)
: Actor(simulator, name), value_(-1), period_(period) {
Schedule(clock_->Now());
}
@@ -89,7 +89,7 @@
per_destination_packet_counter_.clear();
}
- QuicPacketCount CountPacketsForDestination(QuicString destination) const {
+ QuicPacketCount CountPacketsForDestination(std::string destination) const {
auto result_it = per_destination_packet_counter_.find(destination);
if (result_it == per_destination_packet_counter_.cend()) {
return 0;
@@ -101,7 +101,8 @@
QuicByteCount bytes_;
QuicPacketCount packets_;
- QuicUnorderedMap<QuicString, QuicPacketCount> per_destination_packet_counter_;
+ QuicUnorderedMap<std::string, QuicPacketCount>
+ per_destination_packet_counter_;
};
// Sends the packet to the specified destination at the uplink rate. Provides a
@@ -109,9 +110,9 @@
class LinkSaturator : public Endpoint {
public:
LinkSaturator(Simulator* simulator,
- QuicString name,
+ std::string name,
QuicByteCount packet_size,
- QuicString destination)
+ std::string destination)
: Endpoint(simulator, name),
packet_size_(packet_size),
destination_(std::move(destination)),
@@ -155,7 +156,7 @@
private:
QuicByteCount packet_size_;
- QuicString destination_;
+ std::string destination_;
ConstrainedPortInterface* tx_port_;
CounterPort rx_port_;
@@ -427,7 +428,7 @@
class AlarmToggler : public Actor {
public:
AlarmToggler(Simulator* simulator,
- QuicString name,
+ std::string name,
QuicAlarm* alarm,
QuicTime::Delta interval)
: Actor(simulator, name),
@@ -591,7 +592,7 @@
class MockPacketFilter : public PacketFilter {
public:
- MockPacketFilter(Simulator* simulator, QuicString name, Endpoint* endpoint)
+ MockPacketFilter(Simulator* simulator, std::string name, Endpoint* endpoint)
: PacketFilter(simulator, name, endpoint) {}
MOCK_METHOD1(FilterPacket, bool(const Packet&));
};
diff --git a/quic/test_tools/simulator/switch.cc b/quic/test_tools/simulator/switch.cc
index 638fa20..809c7f8 100644
--- a/quic/test_tools/simulator/switch.cc
+++ b/quic/test_tools/simulator/switch.cc
@@ -12,7 +12,7 @@
namespace simulator {
Switch::Switch(Simulator* simulator,
- QuicString name,
+ std::string name,
SwitchPortNumber port_count,
QuicByteCount queue_capacity) {
for (size_t port_number = 1; port_number <= port_count; port_number++) {
@@ -25,7 +25,7 @@
Switch::~Switch() {}
Switch::Port::Port(Simulator* simulator,
- QuicString name,
+ std::string name,
Switch* parent,
SwitchPortNumber port_number,
QuicByteCount queue_capacity)
diff --git a/quic/test_tools/simulator/switch.h b/quic/test_tools/simulator/switch.h
index 4956c01..6d3efc3 100644
--- a/quic/test_tools/simulator/switch.h
+++ b/quic/test_tools/simulator/switch.h
@@ -20,7 +20,7 @@
class Switch {
public:
Switch(Simulator* simulator,
- QuicString name,
+ std::string name,
SwitchPortNumber port_count,
QuicByteCount queue_capacity);
Switch(const Switch&) = delete;
@@ -42,7 +42,7 @@
class Port : public Endpoint, public UnconstrainedPortInterface {
public:
Port(Simulator* simulator,
- QuicString name,
+ std::string name,
Switch* parent,
SwitchPortNumber port_number,
QuicByteCount queue_capacity);
@@ -80,7 +80,7 @@
// This can not be a QuicDeque since pointers into this are
// assumed to be stable.
std::deque<Port> ports_;
- QuicUnorderedMap<QuicString, Port*> switching_table_;
+ QuicUnorderedMap<std::string, Port*> switching_table_;
};
} // namespace simulator
diff --git a/quic/test_tools/simulator/traffic_policer.cc b/quic/test_tools/simulator/traffic_policer.cc
index e416a7d..fa0bcfb 100644
--- a/quic/test_tools/simulator/traffic_policer.cc
+++ b/quic/test_tools/simulator/traffic_policer.cc
@@ -10,7 +10,7 @@
namespace simulator {
TrafficPolicer::TrafficPolicer(Simulator* simulator,
- QuicString name,
+ std::string name,
QuicByteCount initial_bucket_size,
QuicByteCount max_bucket_size,
QuicBandwidth target_bandwidth,
diff --git a/quic/test_tools/simulator/traffic_policer.h b/quic/test_tools/simulator/traffic_policer.h
index ee77576..c2a3e99 100644
--- a/quic/test_tools/simulator/traffic_policer.h
+++ b/quic/test_tools/simulator/traffic_policer.h
@@ -20,7 +20,7 @@
class TrafficPolicer : public PacketFilter {
public:
TrafficPolicer(Simulator* simulator,
- QuicString name,
+ std::string name,
QuicByteCount initial_bucket_size,
QuicByteCount max_bucket_size,
QuicBandwidth target_bandwidth,
@@ -45,7 +45,7 @@
QuicTime last_refill_time_;
// Maps each destination to the number of tokens it has left.
- QuicUnorderedMap<QuicString, QuicByteCount> token_buckets_;
+ QuicUnorderedMap<std::string, QuicByteCount> token_buckets_;
};
} // namespace simulator