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

Side by Side Diff: net/spdy/core/spdy_prefixed_buffer_reader.cc

Issue 2840563003: Implement SpdyMakeUnique and SpdyWrapUnique. (Closed)
Patch Set: Created 3 years, 8 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 | « net/spdy/core/spdy_pinnable_buffer_piece.cc ('k') | net/spdy/core/spdy_protocol.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/spdy/core/spdy_prefixed_buffer_reader.h" 5 #include "net/spdy/core/spdy_prefixed_buffer_reader.h"
6 6
7 #include <new>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 10
9 namespace net { 11 namespace net {
10 12
11 SpdyPrefixedBufferReader::SpdyPrefixedBufferReader( 13 SpdyPrefixedBufferReader::SpdyPrefixedBufferReader(
12 const char* prefix, 14 const char* prefix,
13 size_t prefix_length, 15 size_t prefix_length,
14 const char* suffix, 16 const char* suffix,
15 size_t suffix_length) 17 size_t suffix_length)
16 : prefix_(prefix), 18 : prefix_(prefix),
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 DCHECK(suffix_length_ >= count); 76 DCHECK(suffix_length_ >= count);
75 // Read is fully satisfied by the suffix. 77 // Read is fully satisfied by the suffix.
76 out->buffer_ = suffix_; 78 out->buffer_ = suffix_;
77 suffix_ += count; 79 suffix_ += count;
78 suffix_length_ -= count; 80 suffix_length_ -= count;
79 return true; 81 return true;
80 } 82 }
81 } 83 }
82 84
83 } // namespace net 85 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/core/spdy_pinnable_buffer_piece.cc ('k') | net/spdy/core/spdy_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698