OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/tracing/background_tracing_manager_impl.h" | 5 #include "content/browser/tracing/background_tracing_manager_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 } | 181 } |
182 } | 182 } |
183 | 183 |
184 StartTracingIfConfigNeedsIt(); | 184 StartTracingIfConfigNeedsIt(); |
185 | 185 |
186 RecordBackgroundTracingMetric(SCENARIO_ACTIVATED_SUCCESSFULLY); | 186 RecordBackgroundTracingMetric(SCENARIO_ACTIVATED_SUCCESSFULLY); |
187 return true; | 187 return true; |
188 } | 188 } |
189 | 189 |
190 bool BackgroundTracingManagerImpl::HasActiveScenario() { | 190 bool BackgroundTracingManagerImpl::HasActiveScenario() { |
191 return config_; | 191 return !!config_; |
192 } | 192 } |
193 | 193 |
194 bool BackgroundTracingManagerImpl::IsTracingForTesting() { | 194 bool BackgroundTracingManagerImpl::IsTracingForTesting() { |
195 return is_tracing_; | 195 return is_tracing_; |
196 } | 196 } |
197 | 197 |
198 void BackgroundTracingManagerImpl::ValidateStartupScenario() { | 198 void BackgroundTracingManagerImpl::ValidateStartupScenario() { |
199 if (!config_ || !delegate_) | 199 if (!config_ || !delegate_) |
200 return; | 200 return; |
201 | 201 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 "disabled-by-default-toplevel.flow," | 516 "disabled-by-default-toplevel.flow," |
517 "disabled-by-default-ipc.flow"; | 517 "disabled-by-default-ipc.flow"; |
518 case BackgroundTracingConfigImpl::CategoryPreset::BLINK_STYLE: | 518 case BackgroundTracingConfigImpl::CategoryPreset::BLINK_STYLE: |
519 return "blink_style"; | 519 return "blink_style"; |
520 } | 520 } |
521 NOTREACHED(); | 521 NOTREACHED(); |
522 return ""; | 522 return ""; |
523 } | 523 } |
524 | 524 |
525 } // namspace content | 525 } // namspace content |
OLD | NEW |