| Index: net/disk_cache/blockfile/entry_impl.cc
|
| diff --git a/net/disk_cache/blockfile/entry_impl.cc b/net/disk_cache/blockfile/entry_impl.cc
|
| index add38dea3a2b8437b02e009569ecb53c7adedf11..e3b7bd3d0fb32ef214e39a6760cb94867532cf08 100644
|
| --- a/net/disk_cache/blockfile/entry_impl.cc
|
| +++ b/net/disk_cache/blockfile/entry_impl.cc
|
| @@ -62,7 +62,7 @@ class SyncCallback: public disk_cache::FileIOCallback {
|
| void SyncCallback::OnFileIOComplete(int bytes_copied) {
|
| entry_->DecrementIoCount();
|
| if (!callback_.is_null()) {
|
| - if (entry_->net_log().GetCaptureMode().enabled()) {
|
| + if (entry_->net_log().HasObservers()) {
|
| entry_->net_log().EndEvent(
|
| end_event_type_,
|
| disk_cache::CreateNetLogReadWriteCompleteCallback(bytes_copied));
|
| @@ -315,7 +315,7 @@ void EntryImpl::DoomImpl() {
|
|
|
| int EntryImpl::ReadDataImpl(int index, int offset, IOBuffer* buf, int buf_len,
|
| const CompletionCallback& callback) {
|
| - if (net_log_.GetCaptureMode().enabled()) {
|
| + if (net_log_.HasObservers()) {
|
| net_log_.BeginEvent(
|
| net::NetLog::TYPE_ENTRY_READ_DATA,
|
| CreateNetLogReadWriteDataCallback(index, offset, buf_len, false));
|
| @@ -323,7 +323,7 @@ int EntryImpl::ReadDataImpl(int index, int offset, IOBuffer* buf, int buf_len,
|
|
|
| int result = InternalReadData(index, offset, buf, buf_len, callback);
|
|
|
| - if (result != net::ERR_IO_PENDING && net_log_.GetCaptureMode().enabled()) {
|
| + if (result != net::ERR_IO_PENDING && net_log_.HasObservers()) {
|
| net_log_.EndEvent(
|
| net::NetLog::TYPE_ENTRY_READ_DATA,
|
| CreateNetLogReadWriteCompleteCallback(result));
|
| @@ -334,7 +334,7 @@ int EntryImpl::ReadDataImpl(int index, int offset, IOBuffer* buf, int buf_len,
|
| int EntryImpl::WriteDataImpl(int index, int offset, IOBuffer* buf, int buf_len,
|
| const CompletionCallback& callback,
|
| bool truncate) {
|
| - if (net_log_.GetCaptureMode().enabled()) {
|
| + if (net_log_.HasObservers()) {
|
| net_log_.BeginEvent(
|
| net::NetLog::TYPE_ENTRY_WRITE_DATA,
|
| CreateNetLogReadWriteDataCallback(index, offset, buf_len, truncate));
|
| @@ -343,7 +343,7 @@ int EntryImpl::WriteDataImpl(int index, int offset, IOBuffer* buf, int buf_len,
|
| int result = InternalWriteData(index, offset, buf, buf_len, callback,
|
| truncate);
|
|
|
| - if (result != net::ERR_IO_PENDING && net_log_.GetCaptureMode().enabled()) {
|
| + if (result != net::ERR_IO_PENDING && net_log_.HasObservers()) {
|
| net_log_.EndEvent(
|
| net::NetLog::TYPE_ENTRY_WRITE_DATA,
|
| CreateNetLogReadWriteCompleteCallback(result));
|
|
|