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

Unified Diff: net/spdy/spdy_stream.cc

Issue 965773002: Optimize chained string concatenation in SPDY code. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« net/spdy/spdy_session.cc ('K') | « net/spdy/spdy_session.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream.cc
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index e7dcd5b95d5e2aa82c5e47a0cb50058e98ec514a..9e39000f5be41346323560fedccb63c5c9aff79f 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -349,11 +349,13 @@ void SpdyStream::DecreaseRecvWindowSize(int32 delta_window_size) {
// |delta_window_size| should never cause |recv_window_size_| to go
// negative. If we do, the receive window isn't being respected.
if (delta_window_size > recv_window_size_) {
- session_->ResetStream(
- stream_id_, RST_STREAM_PROTOCOL_ERROR,
- "delta_window_size is " + base::IntToString(delta_window_size) +
- " in DecreaseRecvWindowSize, which is larger than the receive " +
- "window size of " + base::IntToString(recv_window_size_));
+ session_->ResetStream(stream_id_, RST_STREAM_PROTOCOL_ERROR,
+ std::string("delta_window_size is ")
+ .append(base::IntToString(delta_window_size))
+ .append(
+ " in DecreaseRecvWindowSize, which is "
+ "larger than the receive window size of ")
+ .append(base::IntToString(recv_window_size_)));
mmenke 2015/03/09 20:21:58 Worth considering std::StringPrintf here, too?
return;
}
« net/spdy/spdy_session.cc ('K') | « net/spdy/spdy_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698