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

Unified Diff: tools/profile_chrome/chrome_controller.py

Issue 690103005: [Cleanup] List trace categories through script as shown by trace record dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected the logic of wrong insertion! Created 6 years, 1 month 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: tools/profile_chrome/chrome_controller.py
diff --git a/tools/profile_chrome/chrome_controller.py b/tools/profile_chrome/chrome_controller.py
index 91c2504a54c4e34583644db055ad6cd543dd6fb7..b5c911f41b8f003a0a9b53e1c38d66fd980cdd65 100644
--- a/tools/profile_chrome/chrome_controller.py
+++ b/tools/profile_chrome/chrome_controller.py
@@ -51,10 +51,12 @@ class ChromeTracingController(controllers.BaseController):
disabled_by_default_categories = []
json_data = json.loads(json_category_list)['traceCategoriesList']
for item in json_data:
- if item.startswith('disabled-by-default'):
- disabled_by_default_categories.append(item)
- else:
- record_categories.append(item)
+ for category in item.split(','):
+ if category.startswith('disabled-by-default'):
+ if category not in disabled_by_default_categories:
+ disabled_by_default_categories.append(category)
+ elif category not in record_categories:
+ record_categories.append(category)
return record_categories, disabled_by_default_categories
« 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