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

Side by Side Diff: net/spdy/chromium/spdy_buffer.cc

Issue 2832973003: Split net/spdy into core and chromium subdirectories. (Closed)
Patch Set: Fix some more build rules. 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/chromium/spdy_buffer.h ('k') | net/spdy/chromium/spdy_buffer_producer.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 (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/spdy/spdy_buffer.h" 5 #include "net/spdy/chromium/spdy_buffer.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "net/base/io_buffer.h" 13 #include "net/base/io_buffer.h"
14 #include "net/spdy/core/spdy_protocol.h"
14 #include "net/spdy/platform/api/spdy_estimate_memory_usage.h" 15 #include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
15 #include "net/spdy/spdy_protocol.h"
16 16
17 namespace net { 17 namespace net {
18 18
19 namespace { 19 namespace {
20 20
21 // Bound on largest frame any SPDY version has allowed. 21 // Bound on largest frame any SPDY version has allowed.
22 const size_t kMaxSpdyFrameSize = 0x00ffffff; 22 const size_t kMaxSpdyFrameSize = 0x00ffffff;
23 23
24 // Makes a SpdySerializedFrame with |size| bytes of data copied from |data|. 24 // Makes a SpdySerializedFrame with |size| bytes of data copied from |data|.
25 // |data| must be non-NULL and |size| must be positive. 25 // |data| must be non-NULL and |size| must be positive.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 DCHECK_GE(consume_size, 1u); 108 DCHECK_GE(consume_size, 1u);
109 DCHECK_LE(consume_size, GetRemainingSize()); 109 DCHECK_LE(consume_size, GetRemainingSize());
110 offset_ += consume_size; 110 offset_ += consume_size;
111 for (std::vector<ConsumeCallback>::const_iterator it = 111 for (std::vector<ConsumeCallback>::const_iterator it =
112 consume_callbacks_.begin(); it != consume_callbacks_.end(); ++it) { 112 consume_callbacks_.begin(); it != consume_callbacks_.end(); ++it) {
113 it->Run(consume_size, consume_source); 113 it->Run(consume_size, consume_source);
114 } 114 }
115 }; 115 };
116 116
117 } // namespace net 117 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/chromium/spdy_buffer.h ('k') | net/spdy/chromium/spdy_buffer_producer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698