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

Unified Diff: net/http/http_cache_transaction.cc

Issue 1122483004: Remove NetLog::GetCaptureMode() and NetLogCaptureMode::None() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mmenke_refactor
Patch Set: second attempt at fixing int --> bool warning on windows Created 5 years, 7 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.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index fc6b68ec907fd84f1738c112a7b2842ab28958a3..90a984613adf8d5e58becb8a643e22a33465c667 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;
}
« no previous file with comments | « net/disk_cache/simple/simple_entry_impl.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698