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

Unified Diff: tracing/tracing/value/ui/diagnostic_span.html

Issue 3002973002: Refactor diagnostic spans to share a polymer behavior. (Closed)
Patch Set: Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: tracing/tracing/value/ui/diagnostic_span.html
diff --git a/tracing/tracing/value/ui/diagnostic_span.html b/tracing/tracing/value/ui/diagnostic_span.html
index e0812f24b1c3236f4ea8aca972531474f8978b93..86c5547c99fa4ecfb60dd7fe3b137d9803c8ad89 100644
--- a/tracing/tracing/value/ui/diagnostic_span.html
+++ b/tracing/tracing/value/ui/diagnostic_span.html
@@ -61,14 +61,15 @@ tr.exportTo('tr.v.ui', function() {
* Create a visualization for |diagnostic|.
*
* @param {!tr.v.d.Diagnostic} diagnostic
- * @param {!tr.v.Histogram=} opt_histogram
+ * @param {string} name
+ * @param {!tr.v.Histogram} histogram
* @return {Element}
*/
- function createDiagnosticSpan(diagnostic, opt_histogram) {
+ function createDiagnosticSpan(diagnostic, name, histogram) {
const tagName = findElementNameForDiagnostic(diagnostic);
const span = document.createElement(tagName);
- span.histogram = opt_histogram;
- span.diagnostic = diagnostic;
+ if (span.build === undefined) throw new Error(tagName);
+ span.build(diagnostic, name, histogram);
return span;
}

Powered by Google App Engine
This is Rietveld 408576698