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

Unified Diff: net/spdy/hpack/hpack_encoder_test.cc

Issue 1354773002: Avoid string construction overhead for lookup-only HpackEntry objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit: return feels weird in a constructor. Created 5 years, 3 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/spdy/hpack/hpack_decoder.cc ('k') | net/spdy/hpack/hpack_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/hpack/hpack_encoder_test.cc
diff --git a/net/spdy/hpack/hpack_encoder_test.cc b/net/spdy/hpack/hpack_encoder_test.cc
index e2c8feae7b29e229684d6d054729ca02a92806b3..cf30e4ee2afa4090c63362a3638ecc6b89f9c622 100644
--- a/net/spdy/hpack/hpack_encoder_test.cc
+++ b/net/spdy/hpack/hpack_encoder_test.cc
@@ -161,7 +161,7 @@ TEST_F(HpackEncoderTest, SingleDynamicIndex) {
ExpectIndex(IndexOf(key_2_));
SpdyHeaderBlock headers;
- headers[key_2_->name()] = key_2_->value();
+ headers[key_2_->name().as_string()] = key_2_->value().as_string();
CompareWithExpectedEncoding(headers);
}
@@ -169,7 +169,7 @@ TEST_F(HpackEncoderTest, SingleStaticIndex) {
ExpectIndex(IndexOf(static_));
SpdyHeaderBlock headers;
- headers[static_->name()] = static_->value();
+ headers[static_->name().as_string()] = static_->value().as_string();
CompareWithExpectedEncoding(headers);
}
@@ -178,7 +178,7 @@ TEST_F(HpackEncoderTest, SingleStaticIndexTooLarge) {
ExpectIndex(IndexOf(static_));
SpdyHeaderBlock headers;
- headers[static_->name()] = static_->value();
+ headers[static_->name().as_string()] = static_->value().as_string();
CompareWithExpectedEncoding(headers);
EXPECT_EQ(0u, peer_.table_peer().dynamic_entries()->size());
@@ -188,7 +188,7 @@ TEST_F(HpackEncoderTest, SingleLiteralWithIndexName) {
ExpectIndexedLiteral(key_2_, "value3");
SpdyHeaderBlock headers;
- headers[key_2_->name()] = "value3";
+ headers[key_2_->name().as_string()] = "value3";
CompareWithExpectedEncoding(headers);
// A new entry was inserted and added to the reference set.
@@ -230,7 +230,7 @@ TEST_F(HpackEncoderTest, EmitThanEvict) {
ExpectIndexedLiteral("key3", "value3");
SpdyHeaderBlock headers;
- headers[key_1_->name()] = key_1_->value();
+ headers[key_1_->name().as_string()] = key_1_->value().as_string();
headers["key3"] = "value3";
CompareWithExpectedEncoding(headers);
}
« no previous file with comments | « net/spdy/hpack/hpack_decoder.cc ('k') | net/spdy/hpack/hpack_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698