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

Side by Side Diff: net/quic/spdy_utils.cc

Issue 1157103002: Fixing size_t -> int truncation in //net/quic/spdy_utils.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "net/quic/spdy_utils.h" 5 #include "net/quic/spdy_utils.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "net/spdy/spdy_frame_builder.h" 8 #include "net/spdy/spdy_frame_builder.h"
9 #include "net/spdy/spdy_framer.h" 9 #include "net/spdy/spdy_framer.h"
10 #include "net/spdy/spdy_protocol.h" 10 #include "net/spdy/spdy_protocol.h"
(...skipping 21 matching lines...) Expand all
32 response_headers[":status"].erase(end_of_code); 32 response_headers[":status"].erase(end_of_code);
33 } 33 }
34 return response_headers; 34 return response_headers;
35 } 35 }
36 36
37 // static 37 // static
38 string SpdyUtils::SerializeUncompressedHeaders(const SpdyHeaderBlock& headers, 38 string SpdyUtils::SerializeUncompressedHeaders(const SpdyHeaderBlock& headers,
39 QuicVersion quic_version) { 39 QuicVersion quic_version) {
40 SpdyMajorVersion spdy_version = GetSpdyVersionForQuicVersion(quic_version); 40 SpdyMajorVersion spdy_version = GetSpdyVersionForQuicVersion(quic_version);
41 41
42 int length = SpdyFramer::GetSerializedLength(spdy_version, &headers); 42 size_t length = SpdyFramer::GetSerializedLength(spdy_version, &headers);
43 SpdyFrameBuilder builder(length, spdy_version); 43 SpdyFrameBuilder builder(length, spdy_version);
44 SpdyFramer::WriteHeaderBlock(&builder, spdy_version, &headers); 44 SpdyFramer::WriteHeaderBlock(&builder, spdy_version, &headers);
45 scoped_ptr<SpdyFrame> block(builder.take()); 45 scoped_ptr<SpdyFrame> block(builder.take());
46 return string(block->data(), length); 46 return string(block->data(), length);
47 } 47 }
48 48
49 } // namespace net 49 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698