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

Unified Diff: net/spdy/spdy_deframer_visitor.cc

Issue 2758163003: Use string(StringPiece) instead of StringPiece::as_string(). (Closed)
Patch Set: Add StringPiece unittests. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/hpack/hpack_entry.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_deframer_visitor.cc
diff --git a/net/spdy/spdy_deframer_visitor.cc b/net/spdy/spdy_deframer_visitor.cc
index f5ebc21e99d9c808240b3e64a5b669c56cc767c8..2131edaedcc0dc4a790d853a0b43dfffc480a7be 100644
--- a/net/spdy/spdy_deframer_visitor.cc
+++ b/net/spdy/spdy_deframer_visitor.cc
@@ -420,7 +420,7 @@ void SpdyTestDeframerImpl::OnAltSvc(
<< Http2FrameTypeToString(frame_type_);
CHECK_GT(stream_id, 0u);
auto ptr = MakeUnique<SpdyAltSvcIR>(stream_id);
- ptr->set_origin(origin.as_string());
+ ptr->set_origin(std::string(origin));
for (auto& altsvc : altsvc_vector) {
ptr->add_altsvc(altsvc);
}
@@ -761,7 +761,7 @@ void SpdyTestDeframerImpl::OnHeader(StringPiece key, StringPiece value) {
<< " frame_type_=" << Http2FrameTypeToString(frame_type_);
CHECK(!got_hpack_end_);
CHECK(headers_);
- headers_->emplace_back(key.as_string(), value.as_string());
+ headers_->emplace_back(std::string(key), std::string(value));
CHECK(headers_handler_);
headers_handler_->OnHeader(key, value);
}
« no previous file with comments | « net/spdy/hpack/hpack_entry.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698