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

Unified Diff: net/disk_cache/blockfile/entry_impl_v3.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/disk_cache/blockfile/entry_impl.cc ('k') | net/disk_cache/blockfile/sparse_control.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_v3.cc
diff --git a/net/disk_cache/blockfile/entry_impl_v3.cc b/net/disk_cache/blockfile/entry_impl_v3.cc
index 04e9ad97dd37afceb6db00e0e6649c4261eb7a91..78ef1b834f3b96d447fc49d1d6458421e5858149 100644
--- a/net/disk_cache/blockfile/entry_impl_v3.cc
+++ b/net/disk_cache/blockfile/entry_impl_v3.cc
@@ -547,7 +547,7 @@ int EntryImplV3::ReadData(int index, int offset, IOBuffer* buf, int buf_len,
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));
@@ -555,7 +555,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));
@@ -586,7 +586,7 @@ int EntryImplV3::WriteData(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));
@@ -595,7 +595,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/disk_cache/blockfile/entry_impl.cc ('k') | net/disk_cache/blockfile/sparse_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698