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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/io_buffer.h ('k') | net/disk_cache/bitmap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/io_buffer.cc
===================================================================
--- net/base/io_buffer.cc (revision 18456)
+++ net/base/io_buffer.cc (working copy)
@@ -12,5 +12,9 @@
DCHECK(buffer_size > 0);
data_ = new char[buffer_size];
}
+void ReusedIOBuffer::SetOffset(int offset) {
+ DCHECK(offset > 0 && offset < size_);
+ data_ = base_->data() + offset;
+}
} // namespace net
« 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