summaryrefslogtreecommitdiffstats
path: root/net/http/http_cache_transaction.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/http/http_cache_transaction.cc')
-rw-r--r--net/http/http_cache_transaction.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index fc6b68e..90a98461 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -1589,7 +1589,7 @@ int HttpCache::Transaction::DoTruncateCachedData() {
next_state_ = STATE_TRUNCATE_CACHED_DATA_COMPLETE;
if (!entry_)
return OK;
- if (net_log_.GetCaptureMode().enabled())
+ if (net_log_.IsCapturing())
net_log_.BeginEvent(NetLog::TYPE_HTTP_CACHE_WRITE_DATA);
// Truncate the stream.
return WriteToEntry(kResponseContentIndex, 0, NULL, 0, io_callback_);
@@ -1597,7 +1597,7 @@ int HttpCache::Transaction::DoTruncateCachedData() {
int HttpCache::Transaction::DoTruncateCachedDataComplete(int result) {
if (entry_) {
- if (net_log_.GetCaptureMode().enabled()) {
+ if (net_log_.IsCapturing()) {
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HTTP_CACHE_WRITE_DATA,
result);
}
@@ -1612,14 +1612,14 @@ int HttpCache::Transaction::DoTruncateCachedMetadata() {
if (!entry_)
return OK;
- if (net_log_.GetCaptureMode().enabled())
+ if (net_log_.IsCapturing())
net_log_.BeginEvent(NetLog::TYPE_HTTP_CACHE_WRITE_INFO);
return WriteToEntry(kMetadataIndex, 0, NULL, 0, io_callback_);
}
int HttpCache::Transaction::DoTruncateCachedMetadataComplete(int result) {
if (entry_) {
- if (net_log_.GetCaptureMode().enabled()) {
+ if (net_log_.IsCapturing()) {
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HTTP_CACHE_WRITE_INFO,
result);
}
@@ -1756,7 +1756,7 @@ int HttpCache::Transaction::DoCacheWriteResponse() {
"422516 HttpCache::Transaction::DoCacheWriteResponse"));
if (entry_) {
- if (net_log_.GetCaptureMode().enabled())
+ if (net_log_.IsCapturing())
net_log_.BeginEvent(NetLog::TYPE_HTTP_CACHE_WRITE_INFO);
}
return WriteResponseInfoToEntry(false);
@@ -1764,7 +1764,7 @@ int HttpCache::Transaction::DoCacheWriteResponse() {
int HttpCache::Transaction::DoCacheWriteTruncatedResponse() {
if (entry_) {
- if (net_log_.GetCaptureMode().enabled())
+ if (net_log_.IsCapturing())
net_log_.BeginEvent(NetLog::TYPE_HTTP_CACHE_WRITE_INFO);
}
return WriteResponseInfoToEntry(true);
@@ -1775,7 +1775,7 @@ int HttpCache::Transaction::DoCacheWriteResponseComplete(int result) {
target_state_ = STATE_NONE;
if (!entry_)
return OK;
- if (net_log_.GetCaptureMode().enabled()) {
+ if (net_log_.IsCapturing()) {
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HTTP_CACHE_WRITE_INFO,
result);
}
@@ -1827,7 +1827,7 @@ int HttpCache::Transaction::DoCacheReadData() {
DCHECK(entry_);
next_state_ = STATE_CACHE_READ_DATA_COMPLETE;
- if (net_log_.GetCaptureMode().enabled())
+ if (net_log_.IsCapturing())
net_log_.BeginEvent(NetLog::TYPE_HTTP_CACHE_READ_DATA);
if (partial_.get()) {
return partial_->CacheRead(entry_->disk_entry, read_buf_.get(), io_buf_len_,
@@ -1840,7 +1840,7 @@ int HttpCache::Transaction::DoCacheReadData() {
}
int HttpCache::Transaction::DoCacheReadDataComplete(int result) {
- if (net_log_.GetCaptureMode().enabled()) {
+ if (net_log_.IsCapturing()) {
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HTTP_CACHE_READ_DATA,
result);
}
@@ -1871,7 +1871,7 @@ int HttpCache::Transaction::DoCacheWriteData(int num_bytes) {
next_state_ = STATE_CACHE_WRITE_DATA_COMPLETE;
write_len_ = num_bytes;
if (entry_) {
- if (net_log_.GetCaptureMode().enabled())
+ if (net_log_.IsCapturing())
net_log_.BeginEvent(NetLog::TYPE_HTTP_CACHE_WRITE_DATA);
}
@@ -1880,7 +1880,7 @@ int HttpCache::Transaction::DoCacheWriteData(int num_bytes) {
int HttpCache::Transaction::DoCacheWriteDataComplete(int result) {
if (entry_) {
- if (net_log_.GetCaptureMode().enabled()) {
+ if (net_log_.IsCapturing()) {
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HTTP_CACHE_WRITE_DATA,
result);
}
@@ -2701,7 +2701,7 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) {
if ((response_.headers->HasHeaderValue("cache-control", "no-store")) ||
IsCertStatusError(response_.ssl_info.cert_status)) {
DoneWritingToEntry(false);
- if (net_log_.GetCaptureMode().enabled())
+ if (net_log_.IsCapturing())
net_log_.EndEvent(NetLog::TYPE_HTTP_CACHE_WRITE_INFO);
return OK;
}