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

Side by Side Diff: net/spdy/core/spdy_frame_builder.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/core/spdy_frame_builder.h ('k') | net/spdy/core/spdy_frame_builder_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 #include "net/spdy/spdy_frame_builder.h" 5 #include "net/spdy/core/spdy_frame_builder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstdint> 8 #include <cstdint>
9 #include <limits> 9 #include <limits>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "net/spdy/spdy_bug_tracker.h" 12 #include "net/spdy/core/spdy_bug_tracker.h"
13 #include "net/spdy/spdy_framer.h" 13 #include "net/spdy/core/spdy_framer.h"
14 #include "net/spdy/spdy_protocol.h" 14 #include "net/spdy/core/spdy_protocol.h"
15 #include "net/spdy/zero_copy_output_buffer.h" 15 #include "net/spdy/core/zero_copy_output_buffer.h"
16 16
17 namespace net { 17 namespace net {
18 18
19 SpdyFrameBuilder::SpdyFrameBuilder(size_t size) 19 SpdyFrameBuilder::SpdyFrameBuilder(size_t size)
20 : buffer_(new char[size]), capacity_(size), length_(0), offset_(0) {} 20 : buffer_(new char[size]), capacity_(size), length_(0), offset_(0) {}
21 21
22 SpdyFrameBuilder::SpdyFrameBuilder(size_t size, ZeroCopyOutputBuffer* output) 22 SpdyFrameBuilder::SpdyFrameBuilder(size_t size, ZeroCopyOutputBuffer* output)
23 : buffer_(output == nullptr ? new char[size] : nullptr), 23 : buffer_(output == nullptr ? new char[size] : nullptr),
24 output_(output), 24 output_(output),
25 capacity_(size), 25 capacity_(size),
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } else { 271 } else {
272 if (length > output_->BytesFree()) { 272 if (length > output_->BytesFree()) {
273 return false; 273 return false;
274 } 274 }
275 } 275 }
276 276
277 return true; 277 return true;
278 } 278 }
279 279
280 } // namespace net 280 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/core/spdy_frame_builder.h ('k') | net/spdy/core/spdy_frame_builder_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698