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

Side by Side Diff: net/spdy/spdy_framer.cc

Issue 139573002: Added a flow control blocked notification message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-uploading, no changes. Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_framer.h ('k') | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO(rtenhove) clean up frame buffer size calculations so that we aren't 5 // TODO(rtenhove) clean up frame buffer size calculations so that we aren't
6 // constantly adding and subtracting header sizes; this is ugly and error- 6 // constantly adding and subtracting header sizes; this is ugly and error-
7 // prone. 7 // prone.
8 8
9 #include "net/spdy/spdy_framer.h" 9 #include "net/spdy/spdy_framer.h"
10 10
(...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 } 1875 }
1876 SettingsFlagsAndId flags_and_id(setting_flags, it->first); 1876 SettingsFlagsAndId flags_and_id(setting_flags, it->first);
1877 uint32 id_and_flags_wire = flags_and_id.GetWireFormat(protocol_version()); 1877 uint32 id_and_flags_wire = flags_and_id.GetWireFormat(protocol_version());
1878 builder.WriteBytes(&id_and_flags_wire, 4); 1878 builder.WriteBytes(&id_and_flags_wire, 4);
1879 builder.WriteUInt32(it->second.value); 1879 builder.WriteUInt32(it->second.value);
1880 } 1880 }
1881 DCHECK_EQ(size, builder.length()); 1881 DCHECK_EQ(size, builder.length());
1882 return builder.take(); 1882 return builder.take();
1883 } 1883 }
1884 1884
1885 SpdyFrame* SpdyFramer::CreateBlocked(SpdyStreamId stream_id) {
1886 SpdyBlockedIR blocked_ir(stream_id);
1887 return SerializeBlocked(blocked_ir);
1888 }
1889
1885 SpdyFrame* SpdyFramer::SerializeBlocked(const SpdyBlockedIR& blocked) const { 1890 SpdyFrame* SpdyFramer::SerializeBlocked(const SpdyBlockedIR& blocked) const {
1886 DCHECK_LE(4, protocol_version()); 1891 DCHECK_LE(4, protocol_version());
1887 SpdyFrameBuilder builder(GetBlockedSize()); 1892 SpdyFrameBuilder builder(GetBlockedSize());
1888 builder.WriteFramePrefix(*this, BLOCKED, kNoFlags, blocked.stream_id()); 1893 builder.WriteFramePrefix(*this, BLOCKED, kNoFlags, blocked.stream_id());
1889 return builder.take(); 1894 return builder.take();
1890 } 1895 }
1891 1896
1892 SpdyFrame* SpdyFramer::CreatePingFrame(uint32 unique_id) const { 1897 SpdyFrame* SpdyFramer::CreatePingFrame(uint32 unique_id) const {
1893 SpdyPingIR ping(unique_id); 1898 SpdyPingIR ping(unique_id);
1894 return SerializePing(ping); 1899 return SerializePing(ping);
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2399 builder->Seek(compressed_size); 2404 builder->Seek(compressed_size);
2400 builder->RewriteLength(*this); 2405 builder->RewriteLength(*this);
2401 2406
2402 pre_compress_bytes.Add(uncompressed_len); 2407 pre_compress_bytes.Add(uncompressed_len);
2403 post_compress_bytes.Add(compressed_size); 2408 post_compress_bytes.Add(compressed_size);
2404 2409
2405 compressed_frames.Increment(); 2410 compressed_frames.Increment();
2406 } 2411 }
2407 2412
2408 } // namespace net 2413 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_framer.h ('k') | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698