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

Unified Diff: net/spdy/spdy_session.cc

Issue 8790015: Make SpdyFrame::size a constant instead of a static method so gcc can optimize the call away. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fff Created 9 years 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_session.h ('k') | net/spdy/spdy_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index cdd71dcaf54ac7c1ac3f3b59440cd680d82d2d75..3e482303fa7182ece177f1562cc9f8d33a5078af 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -715,8 +715,8 @@ void SpdySession::OnWriteComplete(int result) {
// size.
if (result > 0) {
result = in_flight_write_.buffer()->size();
- DCHECK_GE(result, static_cast<int>(spdy::SpdyFrame::size()));
- result -= static_cast<int>(spdy::SpdyFrame::size());
+ DCHECK_GE(result, static_cast<int>(spdy::SpdyFrame::kHeaderSize));
+ result -= static_cast<int>(spdy::SpdyFrame::kHeaderSize);
}
// It is possible that the stream was cancelled while we were writing
@@ -826,7 +826,7 @@ void SpdySession::WriteSocket() {
return;
}
- size = compressed_frame->length() + spdy::SpdyFrame::size();
+ size = compressed_frame->length() + spdy::SpdyFrame::kHeaderSize;
DCHECK_GT(size, 0u);
@@ -837,7 +837,7 @@ void SpdySession::WriteSocket() {
// Attempt to send the frame.
in_flight_write_ = SpdyIOBuffer(buffer, size, 0, next_buffer.stream());
} else {
- size = uncompressed_frame.length() + spdy::SpdyFrame::size();
+ size = uncompressed_frame.length() + spdy::SpdyFrame::kHeaderSize;
in_flight_write_ = next_buffer;
}
} else {
@@ -906,7 +906,7 @@ int SpdySession::GetNewStreamId() {
void SpdySession::QueueFrame(spdy::SpdyFrame* frame,
spdy::SpdyPriority priority,
SpdyStream* stream) {
- int length = spdy::SpdyFrame::size() + frame->length();
+ int length = spdy::SpdyFrame::kHeaderSize + frame->length();
IOBuffer* buffer = new IOBuffer(length);
memcpy(buffer->data(), frame->data(), length);
queue_.push(SpdyIOBuffer(buffer, length, priority, stream));
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698