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

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

Issue 650483003: Adding instrumentation to locate the source of jankiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | net/disk_cache/blockfile/in_flight_io.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/in_flight_backend_io.cc
diff --git a/net/disk_cache/blockfile/in_flight_backend_io.cc b/net/disk_cache/blockfile/in_flight_backend_io.cc
index 28d7114ba610313a76a4878a3d1460f2c1cacd64..9bb011e7b0823f437cc5454d000d4ec7bcf3a1fb 100644
--- a/net/disk_cache/blockfile/in_flight_backend_io.cc
+++ b/net/disk_cache/blockfile/in_flight_backend_io.cc
@@ -8,6 +8,7 @@
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
+#include "base/profiler/scoped_profile.h"
#include "base/single_thread_task_runner.h"
#include "net/base/net_errors.h"
#include "net/disk_cache/blockfile/backend_impl.h"
@@ -64,8 +65,14 @@ void BackendIO::OnDone(bool cancel) {
if (result() == net::OK) {
static_cast<EntryImpl*>(*entry_ptr_)->OnEntryCreated(backend_);
- if (cancel)
+ if (cancel) {
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/422516 is
+ // fixed.
+ tracked_objects::ScopedProfile tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 BackendIO::OnDone"));
+
(*entry_ptr_)->Close();
+ }
}
}
@@ -496,8 +503,14 @@ void InFlightBackendIO::OnOperationComplete(BackgroundIO* operation,
BackendIO* op = static_cast<BackendIO*>(operation);
op->OnDone(cancel);
- if (!op->callback().is_null() && (!cancel || op->IsEntryOperation()))
+ if (!op->callback().is_null() && (!cancel || op->IsEntryOperation())) {
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedProfile tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 InFlightBackendIO::OnOperationComplete"));
+
op->callback().Run(op->result());
+ }
}
void InFlightBackendIO::PostOperation(BackendIO* operation) {
« no previous file with comments | « no previous file | net/disk_cache/blockfile/in_flight_io.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698