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

Unified Diff: net/disk_cache/entry_impl.cc

Issue 10543114: NetLogEventParameter to Callback refactoring 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update comment in response to comment Created 8 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 | « no previous file | net/disk_cache/mem_entry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/entry_impl.cc
===================================================================
--- net/disk_cache/entry_impl.cc (revision 141669)
+++ net/disk_cache/entry_impl.cc (working copy)
@@ -61,8 +61,7 @@
if (entry_->net_log().IsLoggingAllEvents()) {
entry_->net_log().EndEvent(
end_event_type_,
- make_scoped_refptr(
- new disk_cache::ReadWriteCompleteParameters(bytes_copied)));
+ disk_cache::CreateNetLogReadWriteCompleteCallback(bytes_copied));
}
entry_->ReportIOTime(disk_cache::EntryImpl::kAsyncIO, start_);
callback_.Run(bytes_copied);
@@ -314,8 +313,7 @@
if (net_log_.IsLoggingAllEvents()) {
net_log_.BeginEvent(
net::NetLog::TYPE_ENTRY_READ_DATA,
- make_scoped_refptr(
- new ReadWriteDataParameters(index, offset, buf_len, false)));
+ CreateNetLogReadWriteDataCallback(index, offset, buf_len, false));
}
int result = InternalReadData(index, offset, buf, buf_len, callback);
@@ -323,7 +321,7 @@
if (result != net::ERR_IO_PENDING && net_log_.IsLoggingAllEvents()) {
net_log_.EndEvent(
net::NetLog::TYPE_ENTRY_READ_DATA,
- make_scoped_refptr(new ReadWriteCompleteParameters(result)));
+ CreateNetLogReadWriteCompleteCallback(result));
}
return result;
}
@@ -334,8 +332,7 @@
if (net_log_.IsLoggingAllEvents()) {
net_log_.BeginEvent(
net::NetLog::TYPE_ENTRY_WRITE_DATA,
- make_scoped_refptr(
- new ReadWriteDataParameters(index, offset, buf_len, truncate)));
+ CreateNetLogReadWriteDataCallback(index, offset, buf_len, truncate));
}
int result = InternalWriteData(index, offset, buf, buf_len, callback,
@@ -344,7 +341,7 @@
if (result != net::ERR_IO_PENDING && net_log_.IsLoggingAllEvents()) {
net_log_.EndEvent(
net::NetLog::TYPE_ENTRY_WRITE_DATA,
- make_scoped_refptr(new ReadWriteCompleteParameters(result)));
+ CreateNetLogReadWriteCompleteCallback(result));
}
return result;
}
@@ -458,7 +455,7 @@
}
void EntryImpl::InternalDoom() {
- net_log_.AddEvent(net::NetLog::TYPE_ENTRY_DOOM, NULL);
+ net_log_.AddEvent(net::NetLog::TYPE_ENTRY_DOOM);
DCHECK(node_.HasData());
if (!node_.Data()->dirty) {
node_.Data()->dirty = backend_->GetCurrentEntryId();
@@ -724,7 +721,7 @@
net_log, net::NetLog::SOURCE_DISK_CACHE_ENTRY);
net_log_.BeginEvent(
net::NetLog::TYPE_DISK_CACHE_ENTRY_IMPL,
- make_scoped_refptr(new EntryCreationParameters(GetKey(), created)));
+ CreateNetLogEntryCreationCallback(this, created));
}
const net::BoundNetLog& EntryImpl::net_log() const {
@@ -934,7 +931,7 @@
#if defined(NET_BUILD_STRESS_CACHE)
SanityCheck();
#endif
- net_log_.AddEvent(net::NetLog::TYPE_ENTRY_CLOSE, NULL);
+ net_log_.AddEvent(net::NetLog::TYPE_ENTRY_CLOSE);
bool ret = true;
for (int index = 0; index < kNumStreams; index++) {
if (user_buffers_[index].get()) {
@@ -960,7 +957,7 @@
}
Trace("~EntryImpl out 0x%p", reinterpret_cast<void*>(this));
- net_log_.EndEvent(net::NetLog::TYPE_DISK_CACHE_ENTRY_IMPL, NULL);
+ net_log_.EndEvent(net::NetLog::TYPE_DISK_CACHE_ENTRY_IMPL);
backend_->OnEntryDestroyEnd();
}
« no previous file with comments | « no previous file | net/disk_cache/mem_entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698