Chromium Code Reviews| Index: tracing/tracing/ui/extras/about_tracing/record_selection_dialog.html |
| diff --git a/tracing/tracing/ui/extras/about_tracing/record_selection_dialog.html b/tracing/tracing/ui/extras/about_tracing/record_selection_dialog.html |
| index 9c5de3b3aef6d51c2a4477f56ff4ca4e64effcfa..9c1deb7e4aef664240df961ea46ac2dd444a38e0 100644 |
| --- a/tracing/tracing/ui/extras/about_tracing/record_selection_dialog.html |
| +++ b/tracing/tracing/ui/extras/about_tracing/record_selection_dialog.html |
| @@ -499,6 +499,43 @@ tr.exportTo('tr.ui.e.about_tracing', function() { |
| return results.join(','); |
| }, |
| + includedAndExcludedCategories() { |
| + var includedCategories = []; |
| + var excludedCategories = []; |
| + if (this.usingPreset_()) { |
| + const allCategories = this.allCategories_(); |
| + for (const category in allCategories) { |
| + const disabled = category.indexOf('disabled-by-default-') === 0; |
| + if (this.currentlyChosenPreset_.indexOf(category) >= 0) { |
| + if (disabled) { |
|
fmeawad
2017/06/14 17:18:36
Shouldn't this be if (!disabled)? If this is not t
ssid
2017/06/21 18:38:16
Um ,no. We add "disabled-by-default" categories to
|
| + includedCategories.push(category); |
| + } |
| + } else { |
| + if (!disabled) { |
| + excludedCategories.push(category); |
| + } |
| + } |
| + } |
| + return {included: includedCategories, |
| + excluded: excludedCategories}; |
| + } |
| + |
| + excludedCategories = this.unselectedCategories_(); |
| + const categoriesLength = excludedCategories.length; |
| + const negatedCategories = []; |
| + for (let i = 0; i < categoriesLength; ++i) { |
| + // Skip any category with a , as it will cause issues when we negate. |
| + // Both sides should have been added as separate categories, these can |
| + // only come from settings. |
| + if (excludedCategories[i].match(/,/)) continue; |
| + excludedCategories.push(excludedCategories[i]); |
| + } |
| + |
| + includedCategories = this.enabledDisabledByDefaultCategories_(); |
| + return {included: includedCategories, |
| + excluded: excludedCategories}; |
| + }, |
| + |
| clickRecordButton() { |
| this.recordButtonEl_.click(); |
| }, |