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

Side by Side Diff: tracing/tracing/ui/extras/about_tracing/record_selection_dialog.html

Issue 2948023002: Fix periodic dumping for memory-infra on Android. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 <link rel="import" href="/tracing/core/filter.html"> 7 <link rel="import" href="/tracing/core/filter.html">
8 <link rel="import" href="/tracing/ui/base/dom_helpers.html"> 8 <link rel="import" href="/tracing/ui/base/dom_helpers.html">
9 <link rel="import" href="/tracing/ui/base/info_bar_group.html"> 9 <link rel="import" href="/tracing/ui/base/info_bar_group.html">
10 <link rel="import" href="/tracing/ui/base/overlay.html"> 10 <link rel="import" href="/tracing/ui/base/overlay.html">
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 categoryFilter: ['blink', 'cc', 'gpu', 'renderer.scheduler', 'v8', 205 categoryFilter: ['blink', 'cc', 'gpu', 'renderer.scheduler', 'v8',
206 'toplevel', 206 'toplevel',
207 'disabled-by-default-cc.debug', 207 'disabled-by-default-cc.debug',
208 'disabled-by-default-cc.debug.picture', 208 'disabled-by-default-cc.debug.picture',
209 'disabled-by-default-cc.debug.display_items']}, 209 'disabled-by-default-cc.debug.display_items']},
210 {title: 'Manually select settings', 210 {title: 'Manually select settings',
211 categoryFilter: []} 211 categoryFilter: []}
212 ]; 212 ];
213 const RECORDING_MODES = [ 213 const RECORDING_MODES = [
214 {'label': 'Record until full', 214 {'label': 'Record until full',
215 'value': 'record-until-full'}, 215 'value': 'recordUntilFull'},
216 {'label': 'Record continuously', 216 {'label': 'Record continuously',
217 'value': 'record-continuously'}, 217 'value': 'recordContinuously'},
218 {'label': 'Record as much as possible', 218 {'label': 'Record as much as possible',
219 'value': 'record-as-much-as-possible'}]; 219 'value': 'recordAsMuchAsPossible'}];
220 const DEFAULT_RECORD_MODE = 'record-until-full'; 220 const DEFAULT_RECORD_MODE = 'recordUntilFull';
221 const DEFAULT_CONTINUOUS_TRACING = true; 221 const DEFAULT_CONTINUOUS_TRACING = true;
222 const DEFAULT_SYSTEM_TRACING = true; 222 const DEFAULT_SYSTEM_TRACING = true;
223 const DEFAULT_SAMPLING_TRACING = false; 223 const DEFAULT_SAMPLING_TRACING = false;
224 224
225 RecordSelectionDialog.prototype = { 225 RecordSelectionDialog.prototype = {
226 __proto__: tr.ui.b.Overlay.prototype, 226 __proto__: tr.ui.b.Overlay.prototype,
227 227
228 decorate() { 228 decorate() {
229 tr.ui.b.Overlay.prototype.decorate.call(this); 229 tr.ui.b.Overlay.prototype.decorate.call(this);
230 this.title = 'Record a new trace...'; 230 this.title = 'Record a new trace...';
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 'category-description-hidden'); 448 'category-description-hidden');
449 } else { 449 } else {
450 description.innerText = ''; 450 description.innerText = '';
451 if (!Polymer.dom(description).classList.contains( 451 if (!Polymer.dom(description).classList.contains(
452 'category-description-hidden')) { 452 'category-description-hidden')) {
453 Polymer.dom(description).classList.add('category-description-hidden'); 453 Polymer.dom(description).classList.add('category-description-hidden');
454 } 454 }
455 } 455 }
456 }, 456 },
457 457
458 categoryFilter() { 458 includedAndExcludedCategories() {
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
459 let includedCategories = [];
460 let excludedCategories = [];
459 if (this.usingPreset_()) { 461 if (this.usingPreset_()) {
460 const categories = [];
461 const allCategories = this.allCategories_(); 462 const allCategories = this.allCategories_();
462 for (const category in allCategories) { 463 for (const category in allCategories) {
463 const disabled = category.indexOf('disabled-by-default-') === 0; 464 const disabledByDefault =
465 category.indexOf('disabled-by-default-') === 0;
464 if (this.currentlyChosenPreset_.indexOf(category) >= 0) { 466 if (this.currentlyChosenPreset_.indexOf(category) >= 0) {
465 if (disabled) { 467 if (disabledByDefault) {
466 categories.push(category); 468 includedCategories.push(category);
467 } 469 }
468 } else { 470 } else {
469 if (!disabled) { 471 if (!disabledByDefault) {
470 categories.push('-' + category); 472 excludedCategories.push(category);
471 } 473 }
472 } 474 }
473 } 475 }
474 return categories.join(','); 476 return {
477 included: includedCategories,
478 excluded: excludedCategories
479 };
475 } 480 }
476 481
477 let categories = this.unselectedCategories_(); 482 excludedCategories = this.unselectedCategories_();
478 const categoriesLength = categories.length; 483 includedCategories = this.enabledDisabledByDefaultCategories_();
479 const negatedCategories = []; 484 return {
480 for (let i = 0; i < categoriesLength; ++i) { 485 included: includedCategories,
481 // Skip any category with a , as it will cause issues when we negate. 486 excluded: excludedCategories
482 // Both sides should have been added as separate categories, these can 487 };
483 // only come from settings.
484 if (categories[i].match(/,/)) continue;
485 negatedCategories.push('-' + categories[i]);
486 }
487 categories = negatedCategories.join(',');
488
489 let disabledCategories = this.enabledDisabledByDefaultCategories_();
490 disabledCategories = disabledCategories.join(',');
491
492 const results = [];
493 if (categories !== '') {
494 results.push(categories);
495 }
496 if (disabledCategories !== '') {
497 results.push(disabledCategories);
498 }
499 return results.join(',');
500 }, 488 },
501 489
502 clickRecordButton() { 490 clickRecordButton() {
503 this.recordButtonEl_.click(); 491 this.recordButtonEl_.click();
504 }, 492 },
505 493
506 onRecordButtonClicked_() { 494 onRecordButtonClicked_() {
507 this.visible = false; 495 this.visible = false;
508 tr.b.dispatchSimpleEvent(this, 'recordclick'); 496 tr.b.dispatchSimpleEvent(this, 'recordclick');
509 return false; 497 return false;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 } 679 }
692 warningLink.onclick = onClickHandler.bind(this); 680 warningLink.onclick = onClickHandler.bind(this);
693 } 681 }
694 }; 682 };
695 683
696 return { 684 return {
697 RecordSelectionDialog, 685 RecordSelectionDialog,
698 }; 686 };
699 }); 687 });
700 </script> 688 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698