Chromium Code Reviews| Index: net/disk_cache/mem_entry_impl.cc |
| diff --git a/net/disk_cache/mem_entry_impl.cc b/net/disk_cache/mem_entry_impl.cc |
| index 677cd6ae7702875f2e3eff1d392939efefc323de..487476121e49adb855970273a01177c3119b7d86 100644 |
| --- a/net/disk_cache/mem_entry_impl.cc |
| +++ b/net/disk_cache/mem_entry_impl.cc |
| @@ -185,6 +185,26 @@ int MemEntryImpl::ReadData(int index, int offset, net::IOBuffer* buf, |
| return result; |
| } |
| +int MemEntryImpl::ReadData( |
| + int index, int offset, net::IOBuffer* buf, int buf_len, |
| + const net::CompletionCallback& completion_callback) { |
|
awong
2011/12/08 22:35:11
Should just call the other one with NULL since the
|
| + if (net_log_.IsLoggingAllEvents()) { |
| + net_log_.BeginEvent( |
| + net::NetLog::TYPE_ENTRY_READ_DATA, |
| + make_scoped_refptr( |
| + new ReadWriteDataParameters(index, offset, buf_len, false))); |
| + } |
| + |
| + int result = InternalReadData(index, offset, buf, buf_len); |
| + |
| + if (net_log_.IsLoggingAllEvents()) { |
| + net_log_.EndEvent( |
| + net::NetLog::TYPE_ENTRY_READ_DATA, |
| + make_scoped_refptr(new ReadWriteCompleteParameters(result))); |
| + } |
| + return result; |
| +} |
| + |
| int MemEntryImpl::WriteData(int index, int offset, net::IOBuffer* buf, |
| int buf_len, net::OldCompletionCallback* completion_callback, bool truncate) { |
| if (net_log_.IsLoggingAllEvents()) { |
| @@ -204,6 +224,26 @@ int MemEntryImpl::WriteData(int index, int offset, net::IOBuffer* buf, |
| return result; |
| } |
| +int MemEntryImpl::WriteData( |
| + int index, int offset, net::IOBuffer* buf, int buf_len, |
| + const net::CompletionCallback& completion_callback, bool truncate) { |
|
awong
2011/12/08 22:35:11
Same comment as earlier.
|
| + if (net_log_.IsLoggingAllEvents()) { |
| + net_log_.BeginEvent( |
| + net::NetLog::TYPE_ENTRY_WRITE_DATA, |
| + make_scoped_refptr( |
| + new ReadWriteDataParameters(index, offset, buf_len, truncate))); |
| + } |
| + |
| + int result = InternalWriteData(index, offset, buf, buf_len, truncate); |
| + |
| + if (net_log_.IsLoggingAllEvents()) { |
| + net_log_.EndEvent( |
| + net::NetLog::TYPE_ENTRY_WRITE_DATA, |
| + make_scoped_refptr(new ReadWriteCompleteParameters(result))); |
| + } |
| + return result; |
| +} |
| + |
| int MemEntryImpl::ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len, |
| net::OldCompletionCallback* completion_callback) { |
| if (net_log_.IsLoggingAllEvents()) { |