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

Unified Diff: net/disk_cache/simple/simple_entry_impl.cc

Issue 2315613002: Extracted NetLog class's inner enum types into their own enum classes and (Closed)
Patch Set: Ran "git cl format" on code. Much formatting ensued. Created 4 years, 3 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 | « net/disk_cache/simple/simple_entry_impl.h ('k') | net/dns/dns_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_entry_impl.cc
diff --git a/net/disk_cache/simple/simple_entry_impl.cc b/net/disk_cache/simple/simple_entry_impl.cc
index 77c6c6ce32772188a51d79783a94be8bbb4d2553..85655d97723634e85c3a7eaacea60d5d3f56545f 100644
--- a/net/disk_cache/simple/simple_entry_impl.cc
+++ b/net/disk_cache/simple/simple_entry_impl.cc
@@ -29,6 +29,7 @@
#include "net/disk_cache/simple/simple_net_log_parameters.h"
#include "net/disk_cache/simple/simple_synchronous_entry.h"
#include "net/disk_cache/simple/simple_util.h"
+#include "net/log/net_log_source_type.h"
#include "third_party/zlib/zlib.h"
namespace disk_cache {
@@ -184,7 +185,7 @@ SimpleEntryImpl::SimpleEntryImpl(net::CacheType cache_type,
state_(STATE_UNINITIALIZED),
synchronous_entry_(NULL),
net_log_(net::BoundNetLog::Make(net_log,
- net::NetLog::SOURCE_DISK_CACHE_ENTRY)),
+ net::NetLogSourceType::DISK_CACHE_ENTRY)),
stream_0_data_(new net::GrowableIOBuffer()) {
static_assert(arraysize(data_size_) == arraysize(crc32s_end_offset_),
"arrays should be the same size");
@@ -195,8 +196,8 @@ SimpleEntryImpl::SimpleEntryImpl(net::CacheType cache_type,
static_assert(arraysize(data_size_) == arraysize(crc_check_state_),
"arrays should be the same size");
MakeUninitialized();
- net_log_.BeginEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY,
- CreateNetLogSimpleEntryConstructionCallback(this));
+ net_log_.BeginEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY,
+ CreateNetLogSimpleEntryConstructionCallback(this));
}
void SimpleEntryImpl::SetActiveEntryProxy(
@@ -209,7 +210,7 @@ int SimpleEntryImpl::OpenEntry(Entry** out_entry,
const CompletionCallback& callback) {
DCHECK(backend_.get());
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_OPEN_CALL);
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_OPEN_CALL);
bool have_index = backend_->index()->initialized();
// This enumeration is used in histograms, add entries only at end.
@@ -233,8 +234,7 @@ int SimpleEntryImpl::OpenEntry(Entry** out_entry,
// If entry is not known to the index, initiate fast failover to the network.
if (open_entry_index_enum == INDEX_MISS) {
net_log_.AddEventWithNetErrorCode(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_OPEN_END,
- net::ERR_FAILED);
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_OPEN_END, net::ERR_FAILED);
return net::ERR_FAILED;
}
@@ -249,13 +249,14 @@ int SimpleEntryImpl::CreateEntry(Entry** out_entry,
DCHECK(backend_.get());
DCHECK_EQ(entry_hash_, simple_util::GetEntryHashKey(key_));
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_CREATE_CALL);
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_CREATE_CALL);
bool have_index = backend_->index()->initialized();
int ret_value = net::ERR_FAILED;
if (use_optimistic_operations_ &&
state_ == STATE_UNINITIALIZED && pending_operations_.size() == 0) {
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_CREATE_OPTIMISTIC);
+ net_log_.AddEvent(
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_CREATE_OPTIMISTIC);
ReturnEntryToCaller(out_entry);
pending_operations_.push(SimpleEntryOperation::CreateOperation(
@@ -281,8 +282,8 @@ int SimpleEntryImpl::CreateEntry(Entry** out_entry,
int SimpleEntryImpl::DoomEntry(const CompletionCallback& callback) {
if (doomed_)
return net::OK;
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_DOOM_CALL);
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_DOOM_BEGIN);
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_DOOM_CALL);
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_DOOM_BEGIN);
MarkAsDoomed();
if (backend_.get())
@@ -294,8 +295,8 @@ int SimpleEntryImpl::DoomEntry(const CompletionCallback& callback) {
void SimpleEntryImpl::SetKey(const std::string& key) {
key_ = key;
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_SET_KEY,
- net::NetLog::StringCallback("key", &key));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_SET_KEY,
+ net::NetLog::StringCallback("key", &key));
}
void SimpleEntryImpl::Doom() {
@@ -306,7 +307,7 @@ void SimpleEntryImpl::Close() {
DCHECK(io_thread_checker_.CalledOnValidThread());
DCHECK_LT(0, open_count_);
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_CLOSE_CALL);
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_CLOSE_CALL);
if (--open_count_ > 0) {
DCHECK(!HasOneRef());
@@ -349,15 +350,16 @@ int SimpleEntryImpl::ReadData(int stream_index,
DCHECK(io_thread_checker_.CalledOnValidThread());
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_READ_CALL,
- CreateNetLogReadWriteDataCallback(stream_index, offset, buf_len,
- false));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_READ_CALL,
+ CreateNetLogReadWriteDataCallback(stream_index, offset,
+ buf_len, false));
}
if (stream_index < 0 || stream_index >= kSimpleEntryStreamCount ||
buf_len < 0) {
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_READ_END,
+ net_log_.AddEvent(
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_READ_END,
CreateNetLogReadWriteCompleteCallback(net::ERR_INVALID_ARGUMENT));
}
@@ -367,8 +369,8 @@ int SimpleEntryImpl::ReadData(int stream_index,
if (pending_operations_.empty() && (offset >= GetDataSize(stream_index) ||
offset < 0 || !buf_len)) {
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_READ_END,
- CreateNetLogReadWriteCompleteCallback(0));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_READ_END,
+ CreateNetLogReadWriteCompleteCallback(0));
}
RecordReadResult(cache_type_, READ_RESULT_NONBLOCK_EMPTY_RETURN);
@@ -396,17 +398,16 @@ int SimpleEntryImpl::WriteData(int stream_index,
DCHECK(io_thread_checker_.CalledOnValidThread());
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_WRITE_CALL,
- CreateNetLogReadWriteDataCallback(stream_index, offset, buf_len,
- truncate));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_WRITE_CALL,
+ CreateNetLogReadWriteDataCallback(stream_index, offset,
+ buf_len, truncate));
}
if (stream_index < 0 || stream_index >= kSimpleEntryStreamCount ||
offset < 0 || buf_len < 0) {
if (net_log_.IsCapturing()) {
net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_WRITE_END,
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_WRITE_END,
CreateNetLogReadWriteCompleteCallback(net::ERR_INVALID_ARGUMENT));
}
RecordWriteResult(cache_type_, WRITE_RESULT_INVALID_ARGUMENT);
@@ -414,9 +415,8 @@ int SimpleEntryImpl::WriteData(int stream_index,
}
if (backend_.get() && offset + buf_len > backend_->GetMaxFileSize()) {
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_WRITE_END,
- CreateNetLogReadWriteCompleteCallback(net::ERR_FAILED));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_WRITE_END,
+ CreateNetLogReadWriteCompleteCallback(net::ERR_FAILED));
}
RecordWriteResult(cache_type_, WRITE_RESULT_OVER_MAX_SIZE);
return net::ERR_FAILED;
@@ -457,7 +457,7 @@ int SimpleEntryImpl::WriteData(int stream_index,
ret_value = buf_len;
if (net_log_.IsCapturing()) {
net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_WRITE_OPTIMISTIC,
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_WRITE_OPTIMISTIC,
CreateNetLogReadWriteCompleteCallback(buf_len));
}
}
@@ -480,7 +480,7 @@ int SimpleEntryImpl::ReadSparseData(int64_t offset,
DCHECK(io_thread_checker_.CalledOnValidThread());
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_READ_SPARSE_CALL,
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_READ_SPARSE_CALL,
CreateNetLogSparseOperationCallback(offset, buf_len));
}
@@ -497,8 +497,9 @@ int SimpleEntryImpl::WriteSparseData(int64_t offset,
DCHECK(io_thread_checker_.CalledOnValidThread());
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_WRITE_SPARSE_CALL,
- CreateNetLogSparseOperationCallback(offset, buf_len));
+ net_log_.AddEvent(
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_WRITE_SPARSE_CALL,
+ CreateNetLogSparseOperationCallback(offset, buf_len));
}
ScopedOperationRunner operation_runner(this);
@@ -545,7 +546,7 @@ SimpleEntryImpl::~SimpleEntryImpl() {
DCHECK_EQ(0U, pending_operations_.size());
DCHECK(state_ == STATE_UNINITIALIZED || state_ == STATE_FAILURE);
DCHECK(!synchronous_entry_);
- net_log_.EndEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY);
+ net_log_.EndEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY);
}
void SimpleEntryImpl::PostClientCallback(const CompletionCallback& callback,
@@ -671,20 +672,19 @@ void SimpleEntryImpl::OpenEntryInternal(bool have_index,
Entry** out_entry) {
ScopedOperationRunner operation_runner(this);
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_OPEN_BEGIN);
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_OPEN_BEGIN);
if (state_ == STATE_READY) {
ReturnEntryToCaller(out_entry);
PostClientCallback(callback, net::OK);
- net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_OPEN_END,
- CreateNetLogSimpleEntryCreationCallback(this, net::OK));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_OPEN_END,
+ CreateNetLogSimpleEntryCreationCallback(this, net::OK));
return;
}
if (state_ == STATE_FAILURE) {
PostClientCallback(callback, net::ERR_FAILED);
net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_OPEN_END,
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_OPEN_END,
CreateNetLogSimpleEntryCreationCallback(this, net::ERR_FAILED));
return;
}
@@ -702,7 +702,7 @@ void SimpleEntryImpl::OpenEntryInternal(bool have_index,
Closure reply =
base::Bind(&SimpleEntryImpl::CreationOperationComplete, this, callback,
start_time, base::Passed(&results), out_entry,
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_OPEN_END);
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_OPEN_END);
worker_pool_->PostTaskAndReply(FROM_HERE, task, reply);
}
@@ -711,12 +711,12 @@ void SimpleEntryImpl::CreateEntryInternal(bool have_index,
Entry** out_entry) {
ScopedOperationRunner operation_runner(this);
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_CREATE_BEGIN);
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_CREATE_BEGIN);
if (state_ != STATE_UNINITIALIZED) {
// There is already an active normal entry.
net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_CREATE_END,
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_CREATE_END,
CreateNetLogSimpleEntryCreationCallback(this, net::ERR_FAILED));
PostClientCallback(callback, net::ERR_FAILED);
return;
@@ -745,13 +745,10 @@ void SimpleEntryImpl::CreateEntryInternal(bool have_index,
entry_hash_,
have_index,
results.get());
- Closure reply = base::Bind(&SimpleEntryImpl::CreationOperationComplete,
- this,
- callback,
- start_time,
- base::Passed(&results),
- out_entry,
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_CREATE_END);
+ Closure reply =
+ base::Bind(&SimpleEntryImpl::CreationOperationComplete, this, callback,
+ start_time, base::Passed(&results), out_entry,
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_CREATE_END);
worker_pool_->PostTaskAndReply(FROM_HERE, task, reply);
}
@@ -761,7 +758,7 @@ void SimpleEntryImpl::CloseInternal() {
std::unique_ptr<std::vector<CRCRecord>> crc32s_to_write(
new std::vector<CRCRecord>());
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_CLOSE_BEGIN);
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_CLOSE_BEGIN);
if (state_ == STATE_READY) {
DCHECK(synchronous_entry_);
@@ -811,10 +808,9 @@ void SimpleEntryImpl::ReadDataInternal(int stream_index,
ScopedOperationRunner operation_runner(this);
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_READ_BEGIN,
- CreateNetLogReadWriteDataCallback(stream_index, offset, buf_len,
- false));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_READ_BEGIN,
+ CreateNetLogReadWriteDataCallback(stream_index, offset,
+ buf_len, false));
}
if (state_ == STATE_FAILURE || state_ == STATE_UNINITIALIZED) {
@@ -827,9 +823,8 @@ void SimpleEntryImpl::ReadDataInternal(int stream_index,
FROM_HERE, base::Bind(callback, net::ERR_FAILED));
}
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_READ_END,
- CreateNetLogReadWriteCompleteCallback(net::ERR_FAILED));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_READ_END,
+ CreateNetLogReadWriteCompleteCallback(net::ERR_FAILED));
}
return;
}
@@ -889,18 +884,16 @@ void SimpleEntryImpl::WriteDataInternal(int stream_index,
ScopedOperationRunner operation_runner(this);
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_WRITE_BEGIN,
- CreateNetLogReadWriteDataCallback(stream_index, offset, buf_len,
- truncate));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_WRITE_BEGIN,
+ CreateNetLogReadWriteDataCallback(stream_index, offset,
+ buf_len, truncate));
}
if (state_ == STATE_FAILURE || state_ == STATE_UNINITIALIZED) {
RecordWriteResult(cache_type_, WRITE_RESULT_BAD_STATE);
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_WRITE_END,
- CreateNetLogReadWriteCompleteCallback(net::ERR_FAILED));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_WRITE_END,
+ CreateNetLogReadWriteCompleteCallback(net::ERR_FAILED));
}
if (!callback.is_null()) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
@@ -985,7 +978,7 @@ void SimpleEntryImpl::ReadSparseDataInternal(
if (net_log_.IsCapturing()) {
net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_READ_SPARSE_BEGIN,
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_READ_SPARSE_BEGIN,
CreateNetLogSparseOperationCallback(sparse_offset, buf_len));
}
@@ -1017,7 +1010,7 @@ void SimpleEntryImpl::WriteSparseDataInternal(
if (net_log_.IsCapturing()) {
net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_WRITE_SPARSE_BEGIN,
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_WRITE_SPARSE_BEGIN,
CreateNetLogSparseOperationCallback(sparse_offset, buf_len));
}
@@ -1110,7 +1103,7 @@ void SimpleEntryImpl::CreationOperationComplete(
const base::TimeTicks& start_time,
std::unique_ptr<SimpleEntryCreationResults> in_results,
Entry** out_entry,
- net::NetLog::EventType end_event_type) {
+ net::NetLogEventType end_event_type) {
DCHECK(io_thread_checker_.CalledOnValidThread());
DCHECK_EQ(state_, STATE_IO_PENDING);
DCHECK(in_results);
@@ -1214,7 +1207,8 @@ void SimpleEntryImpl::ReadOperationComplete(
// entry has a single reader, the normal pattern is to read from start
// to finish.
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_CHECKSUM_BEGIN);
+ net_log_.AddEvent(
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_CHECKSUM_BEGIN);
std::unique_ptr<int> new_result(new int());
Closure task = base::Bind(&SimpleSynchronousEntry::CheckEOFRecord,
@@ -1247,9 +1241,8 @@ void SimpleEntryImpl::ReadOperationComplete(
}
}
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_READ_END,
- CreateNetLogReadWriteCompleteCallback(*result));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_READ_END,
+ CreateNetLogReadWriteCompleteCallback(*result));
}
EntryOperationComplete(completion_callback, *entry_stat, std::move(result));
@@ -1265,8 +1258,8 @@ void SimpleEntryImpl::WriteOperationComplete(
else
RecordWriteResult(cache_type_, WRITE_RESULT_SYNC_WRITE_FAILURE);
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_WRITE_END,
- CreateNetLogReadWriteCompleteCallback(*result));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_WRITE_END,
+ CreateNetLogReadWriteCompleteCallback(*result));
}
if (*result < 0) {
@@ -1285,7 +1278,7 @@ void SimpleEntryImpl::ReadSparseOperationComplete(
DCHECK(result);
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_READ_SPARSE_END,
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_READ_SPARSE_END,
CreateNetLogReadWriteCompleteCallback(*result));
}
@@ -1303,7 +1296,7 @@ void SimpleEntryImpl::WriteSparseOperationComplete(
DCHECK(result);
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_WRITE_SPARSE_END,
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_WRITE_SPARSE_END,
CreateNetLogReadWriteCompleteCallback(*result));
}
@@ -1327,7 +1320,7 @@ void SimpleEntryImpl::DoomOperationComplete(
State state_to_restore,
int result) {
state_ = state_to_restore;
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_DOOM_END);
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_DOOM_END);
PostClientCallback(callback, result);
RunNextOperationIfNeeded();
if (backend_)
@@ -1346,8 +1339,7 @@ void SimpleEntryImpl::ChecksumOperationComplete(
if (net_log_.IsCapturing()) {
net_log_.AddEventWithNetErrorCode(
- net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_CHECKSUM_END,
- *result);
+ net::NetLogEventType::SIMPLE_CACHE_ENTRY_CHECKSUM_END, *result);
}
if (*result == net::OK) {
@@ -1360,8 +1352,8 @@ void SimpleEntryImpl::ChecksumOperationComplete(
RecordReadResult(cache_type_, READ_RESULT_SYNC_CHECKSUM_FAILURE);
}
if (net_log_.IsCapturing()) {
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_READ_END,
- CreateNetLogReadWriteCompleteCallback(*result));
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_READ_END,
+ CreateNetLogReadWriteCompleteCallback(*result));
}
SimpleEntryStat entry_stat(last_used_, last_modified_, data_size_,
@@ -1374,7 +1366,7 @@ void SimpleEntryImpl::CloseOperationComplete() {
DCHECK_EQ(0, open_count_);
DCHECK(STATE_IO_PENDING == state_ || STATE_FAILURE == state_ ||
STATE_UNINITIALIZED == state_);
- net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_CLOSE_END);
+ net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_CLOSE_END);
AdjustOpenEntryCountBy(cache_type_, -1);
MakeUninitialized();
RunNextOperationIfNeeded();
« no previous file with comments | « net/disk_cache/simple/simple_entry_impl.h ('k') | net/dns/dns_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698