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

Unified Diff: content/browser/tracing/background_tracing_manager_impl.cc

Issue 2285853002: Reland of Background tracing: Added config option for repeated trigger behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorrect removal Created 4 years, 4 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
Index: content/browser/tracing/background_tracing_manager_impl.cc
diff --git a/content/browser/tracing/background_tracing_manager_impl.cc b/content/browser/tracing/background_tracing_manager_impl.cc
index a4e32e99fbfcfd189cfae0b06d6cdcabc99c3714..4e64d07d5f5277e8653e169f55c2a8e463825e15 100644
--- a/content/browser/tracing/background_tracing_manager_impl.cc
+++ b/content/browser/tracing/background_tracing_manager_impl.cc
@@ -329,9 +329,16 @@ void BackgroundTracingManagerImpl::OnRuleTriggered(
StartTracing(triggered_rule->category_preset(),
base::trace_event::RECORD_UNTIL_FULL);
} else {
- // Reactive configs that trigger again while tracing should just
+ // Some reactive configs that trigger again while tracing should just
// end right away (to not capture multiple navigations, for example).
- trace_delay = -1;
+ // For others we just want to ignore the repeated trigger.
+ if (triggered_rule->stop_tracing_on_repeated_reactive()) {
+ trace_delay = -1;
+ } else {
+ if (!callback.is_null())
+ callback.Run(false);
+ return;
+ }
}
} else {
// In preemptive mode, a trigger starts finalizing a trace if one is
« no previous file with comments | « content/browser/tracing/background_tracing_manager_browsertest.cc ('k') | content/browser/tracing/background_tracing_rule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698