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

Unified Diff: net/disk_cache/in_flight_backend_io.cc

Issue 4067002: First pass at adding http/backend cache to NetLog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add back mysteriously missing files Created 10 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/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) {

Powered by Google App Engine
This is Rietveld 408576698