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

Unified Diff: net/disk_cache/mem_entry_impl.cc

Issue 8794003: base::Bind: Convert disk_cache_based_ssl_host_info. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove an OldCompletionCallback. Created 9 years 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
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()) {

Powered by Google App Engine
This is Rietveld 408576698