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

Unified Diff: base/profiler/scoped_tracker.h

Issue 693943003: Update from https://crrev.com/302630 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « base/metrics/field_trial_unittest.cc ('k') | base/profiler/scoped_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/scoped_tracker.h
diff --git a/base/profiler/scoped_tracker.h b/base/profiler/scoped_tracker.h
index fbd73099bcf122f59b2d639b381939c177120a0c..a1885571351a7a7ca31a3d63e80342743b0d220f 100644
--- a/base/profiler/scoped_tracker.h
+++ b/base/profiler/scoped_tracker.h
@@ -10,6 +10,7 @@
// found using profiler data.
#include "base/base_export.h"
+#include "base/callback_forward.h"
#include "base/location.h"
#include "base/profiler/scoped_profile.h"
@@ -26,6 +27,14 @@ class BASE_EXPORT ScopedTracker {
// this function is not called, all profiler instrumentations are no-ops.
static void Enable();
+ // Augments a |callback| with provided |location|. This is useful for
+ // instrumenting cases when we know that a jank is in a callback and there are
+ // many possible callbacks, but they come from a relatively small number of
+ // places. We can instrument these few places and at least know which one
+ // passes the janky callback.
+ static base::Closure TrackCallback(const Location& location,
+ const base::Closure& callback);
+
private:
const ScopedProfile scoped_profile_;
« no previous file with comments | « base/metrics/field_trial_unittest.cc ('k') | base/profiler/scoped_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698