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

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

Issue 1165673002: [Startup Tracing] Hook up TraceConfig and remove CategoryFilter & TraceOptions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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 64326d95a73feef83100e9bc721f356b1445517f..f121456e55c32d40829d49b36fff99a146ddbba0 100644
--- a/content/browser/tracing/background_tracing_manager_impl.cc
+++ b/content/browser/tracing/background_tracing_manager_impl.cc
@@ -119,7 +119,7 @@ void BackgroundTracingManagerImpl::EnableRecordingIfConfigNeedsIt() {
return;
if (config_->mode == BackgroundTracingConfig::PREEMPTIVE_TRACING_MODE) {
- EnableRecording(GetCategoryFilterForCategoryPreset(
+ EnableRecording(GetCategoryFilterStringForCategoryPreset(
static_cast<BackgroundTracingPreemptiveConfig*>(config_.get())
->category_preset));
} else {
@@ -228,10 +228,10 @@ void BackgroundTracingManagerImpl::InvalidateTriggerHandlesForTesting() {
}
void BackgroundTracingManagerImpl::EnableRecording(
- base::trace_event::CategoryFilter category_filter) {
+ std::string category_filter_str) {
is_tracing_ = TracingController::GetInstance()->EnableRecording(
- category_filter,
- base::trace_event::TraceOptions(base::trace_event::RECORD_CONTINUOUSLY),
+ base::trace_event::TraceConfig(category_filter_str,
+ base::trace_event::RECORD_CONTINUOUSLY),
TracingController::EnableRecordingDoneCallback());
}
@@ -279,21 +279,19 @@ void BackgroundTracingManagerImpl::BeginFinalizing(
callback.Run(true);
}
-base::trace_event::CategoryFilter
-BackgroundTracingManagerImpl::GetCategoryFilterForCategoryPreset(
+std::string
+BackgroundTracingManagerImpl::GetCategoryFilterStringForCategoryPreset(
BackgroundTracingConfig::CategoryPreset preset) const {
switch (preset) {
case BackgroundTracingConfig::CategoryPreset::BENCHMARK:
- return base::trace_event::CategoryFilter(
- "benchmark,"
- "disabled-by-default-toplevel.flow,"
- "disabled-by-default-ipc.flow");
+ return "benchmark,"
+ "disabled-by-default-toplevel.flow,"
+ "disabled-by-default-ipc.flow";
case BackgroundTracingConfig::CategoryPreset::BENCHMARK_DEEP:
- return base::trace_event::CategoryFilter(
- "*,disabled-by-default-blink.debug.layout");
+ return "*,disabled-by-default-blink.debug.layout";
}
NOTREACHED();
- return base::trace_event::CategoryFilter();
+ return "";
}
scoped_ptr<BackgroundTracingConfig> BackgroundTracingConfig::FromDict(
« no previous file with comments | « content/browser/tracing/background_tracing_manager_impl.h ('k') | content/browser/tracing/trace_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698