Chromium Code Reviews| Index: net/disk_cache/in_flight_backend_io.cc |
| =================================================================== |
| --- net/disk_cache/in_flight_backend_io.cc (revision 68857) |
| +++ net/disk_cache/in_flight_backend_io.cc (working copy) |
| @@ -7,6 +7,7 @@ |
| #include "base/compiler_specific.h" |
| #include "base/logging.h" |
| #include "net/base/net_errors.h" |
| +#include "net/base/net_log.h" |
| #include "net/disk_cache/backend_impl.h" |
| #include "net/disk_cache/entry_impl.h" |
| #include "net/disk_cache/histogram_macros.h" |
| @@ -108,11 +109,15 @@ |
| void BackendIO::CloseEntryImpl(EntryImpl* entry) { |
| operation_ = OP_CLOSE_ENTRY; |
| entry_ = entry; |
| + if (entry->net_log().IsLoggingAllEvents()) |
| + entry->net_log().AddEvent(net::NetLog::TYPE_DISK_CACHE_QUEUE_CLOSE, NULL); |
| } |
| void BackendIO::DoomEntryImpl(EntryImpl* entry) { |
| operation_ = OP_DOOM_ENTRY; |
| entry_ = entry; |
| + if (entry->net_log().IsLoggingAllEvents()) |
| + entry->net_log().AddEvent(net::NetLog::TYPE_DISK_CACHE_QUEUE_DOOM, NULL); |
| } |
| void BackendIO::FlushQueue() { |
| @@ -132,6 +137,11 @@ |
| offset_ = offset; |
| buf_ = buf; |
| buf_len_ = buf_len; |
| + |
| + if (entry->net_log().IsLoggingAllEvents()) { |
| + entry->net_log().AddEvent(net::NetLog::TYPE_DISK_CACHE_QUEUE_READ_DATA, |
|
rvargas (doing something else)
2010/12/13 23:34:39
I'd actually remove all logging from this file.
T
mmenke
2010/12/14 17:53:43
All DISK_CACHE_QUEUE events removed. Wasn't sure
|
| + NULL); |
| + } |
| } |
| void BackendIO::WriteData(EntryImpl* entry, int index, int offset, |
| @@ -143,6 +153,11 @@ |
| buf_ = buf; |
| buf_len_ = buf_len; |
| truncate_ = truncate; |
| + |
| + if (entry->net_log().IsLoggingAllEvents()) { |
| + entry->net_log().AddEvent(net::NetLog::TYPE_DISK_CACHE_QUEUE_WRITE_DATA, |
| + NULL); |
| + } |
| } |
| void BackendIO::ReadSparseData(EntryImpl* entry, int64 offset, |
| @@ -152,6 +167,11 @@ |
| offset64_ = offset; |
| buf_ = buf; |
| buf_len_ = buf_len; |
| + |
| + if (entry->net_log().IsLoggingAllEvents()) { |
| + entry->net_log().AddEvent(net::NetLog::TYPE_DISK_CACHE_QUEUE_READ_SPARSE, |
|
rvargas (doing something else)
2010/12/13 23:34:39
Read/Write sparse should probably be logged direct
|
| + NULL); |
| + } |
| } |
| void BackendIO::WriteSparseData(EntryImpl* entry, int64 offset, |
| @@ -161,6 +181,11 @@ |
| offset64_ = offset; |
| buf_ = buf; |
| buf_len_ = buf_len; |
| + |
| + if (entry->net_log().IsLoggingAllEvents()) { |
| + entry->net_log().AddEvent(net::NetLog::TYPE_DISK_CACHE_QUEUE_WRITE_SPARSE, |
| + NULL); |
| + } |
| } |
| void BackendIO::GetAvailableRange(EntryImpl* entry, int64 offset, int len, |
| @@ -170,6 +195,11 @@ |
| offset64_ = offset; |
| buf_len_ = len; |
| start_ = start; |
| + |
| + if (entry->net_log().IsLoggingAllEvents()) { |
| + entry->net_log().AddEvent(net::NetLog::TYPE_DISK_CACHE_QUEUE_GET_RANGE, |
| + NULL); |
| + } |
| } |
| void BackendIO::CancelSparseIO(EntryImpl* entry) { |