OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/media/rtc_data_channel_handler.h" | 5 #include "content/renderer/media/rtc_data_channel_handler.h" |
6 | 6 |
7 #include <limits> | |
7 #include <string> | 8 #include <string> |
8 | 9 |
9 #include "base/logging.h" | 10 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
11 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
(...skipping 21 matching lines...) Expand all Loading... | |
38 DVLOG(1) << "::ctor"; | 39 DVLOG(1) << "::ctor"; |
39 channel_->RegisterObserver(this); | 40 channel_->RegisterObserver(this); |
40 | 41 |
41 IncrementCounter(CHANNEL_CREATED); | 42 IncrementCounter(CHANNEL_CREATED); |
42 if (isReliable()) | 43 if (isReliable()) |
43 IncrementCounter(CHANNEL_RELIABLE); | 44 IncrementCounter(CHANNEL_RELIABLE); |
44 if (ordered()) | 45 if (ordered()) |
45 IncrementCounter(CHANNEL_ORDERED); | 46 IncrementCounter(CHANNEL_ORDERED); |
46 if (negotiated()) | 47 if (negotiated()) |
47 IncrementCounter(CHANNEL_NEGOTIATED); | 48 IncrementCounter(CHANNEL_NEGOTIATED); |
49 | |
50 UMA_HISTOGRAM_CUSTOM_COUNTS("WebRTC.DataChannelMaxRetransmits", | |
51 maxRetransmits(), 1, | |
jiayl
2014/05/07 16:25:07
min should be 0
perkj_chrome
2014/05/07 17:53:56
oops - I thought this was the size of each slot in
| |
52 std::numeric_limits<unsigned short>::max(), 50); | |
53 UMA_HISTOGRAM_CUSTOM_COUNTS("WebRTC.DataChannelMaxRetransmitTime", | |
54 maxRetransmitTime(), 1, | |
jiayl
2014/05/07 16:25:07
min should be 0
perkj_chrome
2014/05/07 17:53:56
Done.
| |
55 std::numeric_limits<unsigned short>::max(), 50); | |
48 } | 56 } |
49 | 57 |
50 RtcDataChannelHandler::~RtcDataChannelHandler() { | 58 RtcDataChannelHandler::~RtcDataChannelHandler() { |
51 DVLOG(1) << "::dtor"; | 59 DVLOG(1) << "::dtor"; |
52 channel_->UnregisterObserver(); | 60 channel_->UnregisterObserver(); |
53 } | 61 } |
54 | 62 |
55 void RtcDataChannelHandler::setClient( | 63 void RtcDataChannelHandler::setClient( |
56 blink::WebRTCDataChannelHandlerClient* client) { | 64 blink::WebRTCDataChannelHandlerClient* client) { |
57 webkit_client_ = client; | 65 webkit_client_ = client; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 num_bytes, | 186 num_bytes, |
179 1, kMaxBucketSize, kNumBuckets); | 187 1, kMaxBucketSize, kNumBuckets); |
180 } else { | 188 } else { |
181 UMA_HISTOGRAM_CUSTOM_COUNTS("WebRTC.UnreliableDataChannelMessageSize", | 189 UMA_HISTOGRAM_CUSTOM_COUNTS("WebRTC.UnreliableDataChannelMessageSize", |
182 num_bytes, | 190 num_bytes, |
183 1, kMaxBucketSize, kNumBuckets); | 191 1, kMaxBucketSize, kNumBuckets); |
184 } | 192 } |
185 } | 193 } |
186 | 194 |
187 } // namespace content | 195 } // namespace content |
OLD | NEW |