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

Unified Diff: net/disk_cache/blockfile/entry_impl.cc

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict Created 5 years, 8 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/cert/x509_certificate_net_log_param.cc ('k') | net/disk_cache/blockfile/entry_impl_v3.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/entry_impl.cc
diff --git a/net/disk_cache/blockfile/entry_impl.cc b/net/disk_cache/blockfile/entry_impl.cc
index 76bf7c7bfbb0fc278f89c331447f0201e688ac2c..add38dea3a2b8437b02e009569ecb53c7adedf11 100644
--- a/net/disk_cache/blockfile/entry_impl.cc
+++ b/net/disk_cache/blockfile/entry_impl.cc
@@ -62,7 +62,7 @@ class SyncCallback: public disk_cache::FileIOCallback {
void SyncCallback::OnFileIOComplete(int bytes_copied) {
entry_->DecrementIoCount();
if (!callback_.is_null()) {
- if (entry_->net_log().IsLogging()) {
+ if (entry_->net_log().GetCaptureMode().enabled()) {
entry_->net_log().EndEvent(
end_event_type_,
disk_cache::CreateNetLogReadWriteCompleteCallback(bytes_copied));
@@ -315,7 +315,7 @@ void EntryImpl::DoomImpl() {
int EntryImpl::ReadDataImpl(int index, int offset, IOBuffer* buf, int buf_len,
const CompletionCallback& callback) {
- if (net_log_.IsLogging()) {
+ if (net_log_.GetCaptureMode().enabled()) {
net_log_.BeginEvent(
net::NetLog::TYPE_ENTRY_READ_DATA,
CreateNetLogReadWriteDataCallback(index, offset, buf_len, false));
@@ -323,7 +323,7 @@ int EntryImpl::ReadDataImpl(int index, int offset, IOBuffer* buf, int buf_len,
int result = InternalReadData(index, offset, buf, buf_len, callback);
- if (result != net::ERR_IO_PENDING && net_log_.IsLogging()) {
+ if (result != net::ERR_IO_PENDING && net_log_.GetCaptureMode().enabled()) {
net_log_.EndEvent(
net::NetLog::TYPE_ENTRY_READ_DATA,
CreateNetLogReadWriteCompleteCallback(result));
@@ -334,7 +334,7 @@ int EntryImpl::ReadDataImpl(int index, int offset, IOBuffer* buf, int buf_len,
int EntryImpl::WriteDataImpl(int index, int offset, IOBuffer* buf, int buf_len,
const CompletionCallback& callback,
bool truncate) {
- if (net_log_.IsLogging()) {
+ if (net_log_.GetCaptureMode().enabled()) {
net_log_.BeginEvent(
net::NetLog::TYPE_ENTRY_WRITE_DATA,
CreateNetLogReadWriteDataCallback(index, offset, buf_len, truncate));
@@ -343,7 +343,7 @@ int EntryImpl::WriteDataImpl(int index, int offset, IOBuffer* buf, int buf_len,
int result = InternalWriteData(index, offset, buf, buf_len, callback,
truncate);
- if (result != net::ERR_IO_PENDING && net_log_.IsLogging()) {
+ if (result != net::ERR_IO_PENDING && net_log_.GetCaptureMode().enabled()) {
net_log_.EndEvent(
net::NetLog::TYPE_ENTRY_WRITE_DATA,
CreateNetLogReadWriteCompleteCallback(result));
« no previous file with comments | « net/cert/x509_certificate_net_log_param.cc ('k') | net/disk_cache/blockfile/entry_impl_v3.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698