diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-12 19:07:09 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-12 19:07:09 +0000 |
commit | 8cab8a839a55e1fb479336af673a49b5056d6862 (patch) | |
tree | 87a17d8e6975c94fcf9ac7aa2339a4e52614103f /net/disk_cache/entry_impl.cc | |
parent | 750f7d2ee7674100d66b40dbc478a24b0d05c29a (diff) | |
download | chromium_src-8cab8a839a55e1fb479336af673a49b5056d6862.zip chromium_src-8cab8a839a55e1fb479336af673a49b5056d6862.tar.gz chromium_src-8cab8a839a55e1fb479336af673a49b5056d6862.tar.bz2 |
NetLogEventParameter to Callback refactoring 2.
Get rid of all uses of NetLogEventParameters in net/disk_cache.
R=eroman@chromium.org
BUG=126243
Review URL: https://chromiumcodereview.appspot.com/10543114
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141697 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/entry_impl.cc')
-rw-r--r-- | net/disk_cache/entry_impl.cc | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/entry_impl.cc index 4991375..b79230f 100644 --- a/net/disk_cache/entry_impl.cc +++ b/net/disk_cache/entry_impl.cc @@ -61,8 +61,7 @@ void SyncCallback::OnFileIOComplete(int bytes_copied) { 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 @@ int EntryImpl::ReadDataImpl(int index, int offset, IOBuffer* buf, int buf_len, 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 @@ int EntryImpl::ReadDataImpl(int index, int offset, IOBuffer* buf, int buf_len, 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 @@ int EntryImpl::WriteDataImpl(int index, int offset, IOBuffer* buf, int buf_len, 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 @@ int EntryImpl::WriteDataImpl(int index, int offset, IOBuffer* buf, int buf_len, 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 @@ bool EntryImpl::IsSameEntry(const std::string& key, uint32 hash) { } 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 @@ void EntryImpl::BeginLogging(net::NetLog* net_log, bool created) { 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 @@ EntryImpl::~EntryImpl() { #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 @@ EntryImpl::~EntryImpl() { } 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(); } |