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

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

Issue 1277503005: Fixed variable shadowing in BackgroundTracingManagerImpl::IsSupportedConfig (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9d8b67ad78122e29469175461f17713e75e4c37c..6cdb697426a220638d91906619f2010c323ae107 100644
--- a/content/browser/tracing/background_tracing_manager_impl.cc
+++ b/content/browser/tracing/background_tracing_manager_impl.cc
@@ -138,12 +138,11 @@ bool BackgroundTracingManagerImpl::IsSupportedConfig(
return true;
if (config->mode == BackgroundTracingConfig::PREEMPTIVE_TRACING_MODE) {
- BackgroundTracingPreemptiveConfig* preemptive_config =
- static_cast<BackgroundTracingPreemptiveConfig*>(config);
- for (const auto& config : preemptive_config->configs) {
- if (config.type == BackgroundTracingPreemptiveConfig::
- MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED ||
- config.type ==
+ for (const auto& preemptive_config :
+ static_cast<BackgroundTracingPreemptiveConfig*>(config)->configs) {
+ if (preemptive_config.type == BackgroundTracingPreemptiveConfig::
+ MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED ||
+ preemptive_config.type ==
BackgroundTracingPreemptiveConfig::
MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE) {
continue;
@@ -153,10 +152,9 @@ bool BackgroundTracingManagerImpl::IsSupportedConfig(
}
if (config->mode == BackgroundTracingConfig::REACTIVE_TRACING_MODE) {
- BackgroundTracingReactiveConfig* reactive_config =
- static_cast<BackgroundTracingReactiveConfig*>(config);
- for (const auto& config : reactive_config->configs) {
- if (config.type !=
+ for (const auto& reactive_config :
+ static_cast<BackgroundTracingReactiveConfig*>(config)->configs) {
+ if (reactive_config.type !=
BackgroundTracingReactiveConfig::TRACE_FOR_10S_OR_TRIGGER_OR_FULL)
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698