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..179fd08ba71d5f00dc3a657f9af6d18942643cbc 100644 |
| --- a/tracing/tracing/ui/extras/about_tracing/record_selection_dialog.html |
| +++ b/tracing/tracing/ui/extras/about_tracing/record_selection_dialog.html |
| @@ -212,12 +212,12 @@ tr.exportTo('tr.ui.e.about_tracing', function() { |
| ]; |
| const RECORDING_MODES = [ |
| {'label': 'Record until full', |
| - 'value': 'record-until-full'}, |
| + 'value': 'recordUntilFull'}, |
| {'label': 'Record continuously', |
| - 'value': 'record-continuously'}, |
| + 'value': 'recordContinuously'}, |
| {'label': 'Record as much as possible', |
| - 'value': 'record-as-much-as-possible'}]; |
| - const DEFAULT_RECORD_MODE = 'record-until-full'; |
| + 'value': 'recordAsMuchAsPossible'}]; |
| + const DEFAULT_RECORD_MODE = 'recordUntilFull'; |
| const DEFAULT_CONTINUOUS_TRACING = true; |
| const DEFAULT_SYSTEM_TRACING = true; |
| const DEFAULT_SAMPLING_TRACING = false; |
| @@ -455,48 +455,36 @@ tr.exportTo('tr.ui.e.about_tracing', function() { |
| } |
| }, |
| - categoryFilter() { |
|
ssid
2017/06/21 18:59:20
As I mentioned earlier, the desktop tracing contro
erikchen
2017/06/21 22:56:50
There's only 1 other client - the xhr client used
|
| + includedAndExcludedCategories() { |
| + let includedCategories = []; |
| + let excludedCategories = []; |
| if (this.usingPreset_()) { |
| - const categories = []; |
| const allCategories = this.allCategories_(); |
| for (const category in allCategories) { |
| - const disabled = category.indexOf('disabled-by-default-') === 0; |
| + const disabledByDefault = |
| + category.indexOf('disabled-by-default-') === 0; |
| if (this.currentlyChosenPreset_.indexOf(category) >= 0) { |
| - if (disabled) { |
| - categories.push(category); |
| + if (disabledByDefault) { |
| + includedCategories.push(category); |
| } |
| } else { |
| - if (!disabled) { |
| - categories.push('-' + category); |
| + if (!disabledByDefault) { |
| + excludedCategories.push(category); |
| } |
| } |
| } |
| - return categories.join(','); |
| + return { |
| + included: includedCategories, |
| + excluded: excludedCategories |
| + }; |
| } |
| - let categories = this.unselectedCategories_(); |
| - const categoriesLength = categories.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 (categories[i].match(/,/)) continue; |
| - negatedCategories.push('-' + categories[i]); |
| - } |
| - categories = negatedCategories.join(','); |
| - |
| - let disabledCategories = this.enabledDisabledByDefaultCategories_(); |
| - disabledCategories = disabledCategories.join(','); |
| - |
| - const results = []; |
| - if (categories !== '') { |
| - results.push(categories); |
| - } |
| - if (disabledCategories !== '') { |
| - results.push(disabledCategories); |
| - } |
| - return results.join(','); |
| + excludedCategories = this.unselectedCategories_(); |
| + includedCategories = this.enabledDisabledByDefaultCategories_(); |
| + return { |
| + included: includedCategories, |
| + excluded: excludedCategories |
| + }; |
| }, |
| clickRecordButton() { |