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

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

Issue 2247033005: Background tracing: Added config option for repeated trigger behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 0fa36ef58a13dbc5395bebc2fabed971c7c04b4e..fc4be323c8e76b8c764d06fa875253645a5af598 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

Powered by Google App Engine
This is Rietveld 408576698