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

Unified Diff: net/disk_cache/blockfile/sparse_control_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/sparse_control.cc ('k') | net/disk_cache/memory/mem_entry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/sparse_control_v3.cc
diff --git a/net/disk_cache/blockfile/sparse_control_v3.cc b/net/disk_cache/blockfile/sparse_control_v3.cc
index cba0ed5393f180e17dce388c900119f8df22ccb5..742009f3484ae5f787f53079005c28bd8e902ae9 100644
--- a/net/disk_cache/blockfile/sparse_control_v3.cc
+++ b/net/disk_cache/blockfile/sparse_control_v3.cc
@@ -163,7 +163,7 @@ net::NetLog::EventType GetSparseEventType(
void LogChildOperationEnd(const net::BoundNetLog& net_log,
disk_cache::SparseControl::SparseOperation operation,
int result) {
- if (net_log.IsLogging()) {
+ if (net_log.GetCaptureMode().enabled()) {
net::NetLog::EventType event_type;
switch (operation) {
case disk_cache::SparseControl::kReadOperation:
@@ -254,7 +254,7 @@ int SparseControl::StartIO(SparseOperation op, int64 offset, net::IOBuffer* buf,
finished_ = false;
abort_ = false;
- if (entry_->net_log().IsLogging()) {
+ if (entry_->net_log().GetCaptureMode().enabled()) {
entry_->net_log().BeginEvent(
GetSparseEventType(operation_),
CreateNetLogSparseOperationCallback(offset_, buf_len_));
@@ -563,7 +563,7 @@ bool SparseControl::DoChildIO() {
int rv = 0;
switch (operation_) {
case kReadOperation:
- if (entry_->net_log().IsLogging()) {
+ if (entry_->net_log().GetCaptureMode().enabled()) {
entry_->net_log().BeginEvent(
net::NetLog::TYPE_SPARSE_READ_CHILD_DATA,
CreateNetLogSparseReadWriteCallback(child_->net_log().source(),
@@ -573,7 +573,7 @@ bool SparseControl::DoChildIO() {
child_len_, callback);
break;
case kWriteOperation:
- if (entry_->net_log().IsLogging()) {
+ if (entry_->net_log().GetCaptureMode().enabled()) {
entry_->net_log().BeginEvent(
net::NetLog::TYPE_SPARSE_WRITE_CHILD_DATA,
CreateNetLogSparseReadWriteCallback(child_->net_log().source(),
@@ -846,7 +846,7 @@ void SparseControl::OnChildIOCompleted(int result) {
// We'll return the current result of the operation, which may be less than
// the bytes to read or write, but the user cancelled the operation.
abort_ = false;
- if (entry_->net_log().IsLogging()) {
+ if (entry_->net_log().GetCaptureMode().enabled()) {
entry_->net_log().AddEvent(net::NetLog::TYPE_CANCELLED);
entry_->net_log().EndEvent(GetSparseEventType(operation_));
}
« no previous file with comments | « net/disk_cache/blockfile/sparse_control.cc ('k') | net/disk_cache/memory/mem_entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698