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

Unified Diff: net/quic/core/quic_framer_test.cc

Issue 2617523002: Migrate StringPiece::AppendToString to StrAppend (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | net/quic/test_tools/simple_quic_framer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_framer_test.cc
diff --git a/net/quic/core/quic_framer_test.cc b/net/quic/core/quic_framer_test.cc
index dcdb2ea36b6b88e3c301babdfa4c8e819bc1381f..b3485bc16d0bef236c166da511cb529900326557 100644
--- a/net/quic/core/quic_framer_test.cc
+++ b/net/quic/core/quic_framer_test.cc
@@ -247,9 +247,7 @@ class TestQuicVisitor : public QuicFramerVisitorInterface {
bool OnStreamFrame(const QuicStreamFrame& frame) override {
++frame_count_;
// Save a copy of the data so it is valid after the packet is processed.
- string* string_data = new string();
- StringPiece(frame.data_buffer, frame.data_length)
- .AppendToString(string_data);
+ string* string_data = new string(frame.data_buffer, frame.data_length);
stream_data_.push_back(base::WrapUnique(string_data));
stream_frames_.push_back(base::MakeUnique<QuicStreamFrame>(
frame.stream_id, frame.fin, frame.offset, *string_data));
« no previous file with comments | « no previous file | net/quic/test_tools/simple_quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698