Commit dca06bb4 authored by Takumi Fujimoto's avatar Takumi Fujimoto Committed by Commit Bot

[Media Router WebUI] Filter out domain-less pseudo sinks from sink count

We were counting hidden (domain-less) pseudo sinks in the device count
metric, which was inflating the data. This CL subtracts such pseudo
sinks from the count.

Bug: 868139

Change-Id: Ic389b89390ed28f9ebb25af60be452ff2df47c7c
Reviewed-on: https://chromium-review.googlesource.com/1152350Reviewed-by: default avatarDerek Cheng <imcheng@chromium.org>
Commit-Queue: Takumi Fujimoto <takumif@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578822}
parent d42ff3d7
...@@ -465,8 +465,13 @@ Polymer({ ...@@ -465,8 +465,13 @@ Polymer({
// sinks. // sinks.
this.async(function() { this.async(function() {
this.justOpened_ = false; this.justOpened_ = false;
// |pseudoSinks_| does not contain pseudo sinks without a domain, so it
// cannot be used for calculating the number of real sinks.
var realSinks = this.allSinks.filter(function(sink) {
return !sink.isPseudoSink;
});
this.fire('report-sink-count', { this.fire('report-sink-count', {
sinkCount: this.allSinks.length - this.pseudoSinks_.length, sinkCount: realSinks.length,
}); });
}, 3000 /* 3 seconds */); }, 3000 /* 3 seconds */);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment