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

Side by Side Diff: net/base/io_buffer.cc

Issue 126179: Disk cache: First pass to add support for sparse entries.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « net/base/io_buffer.h ('k') | net/disk_cache/bitmap.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/base/io_buffer.h" 5 #include "net/base/io_buffer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace net { 9 namespace net {
10 10
11 IOBuffer::IOBuffer(int buffer_size) { 11 IOBuffer::IOBuffer(int buffer_size) {
12 DCHECK(buffer_size > 0); 12 DCHECK(buffer_size > 0);
13 data_ = new char[buffer_size]; 13 data_ = new char[buffer_size];
14 } 14 }
15 void ReusedIOBuffer::SetOffset(int offset) {
16 DCHECK(offset > 0 && offset < size_);
17 data_ = base_->data() + offset;
18 }
15 19
16 } // namespace net 20 } // namespace net
OLDNEW
« no previous file with comments | « net/base/io_buffer.h ('k') | net/disk_cache/bitmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698