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

Unified Diff: net/spdy/spdy_framer.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/spdy_deframer_visitor.cc ('k') | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_framer.cc
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index bfe45968c5987fe7cd98e4a7fe14c74f4f738609..ee1b3c66e82c22340f53770a969bdc7a948b2ea1 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -1659,7 +1659,7 @@ bool SpdyFramer::ParseHeaderBlockInBuffer(const char* header_data,
<< " contains upper-case characters.";
return false;
}
- std::string name = temp.as_string();
+ std::string name(temp);
// Read header value.
if (!reader.ReadStringPiece32(&temp)) {
@@ -1667,7 +1667,7 @@ bool SpdyFramer::ParseHeaderBlockInBuffer(const char* header_data,
<< num_headers << ").";
return false;
}
- std::string value = temp.as_string();
+ std::string value(temp);
// Ensure no duplicates.
if (block->find(name) != block->end()) {
« no previous file with comments | « net/spdy/spdy_deframer_visitor.cc ('k') | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698