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 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "base/threading/non_thread_safe.h" | 9 #include "base/threading/non_thread_safe.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "content/public/common/media_stream_request.h" | |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 | 14 |
15 // Enum to track UserMediaRequest events. MediaStreamRequestResult events are | |
16 // mapped directly to MediaStreamRequestResult + 10. | |
17 enum UserMediaRequestEvent { | |
18 USERMEDIAREQUEST_CREATED = 0, | |
vrk (LEFT CHROMIUM)
2014/08/04 18:22:17
I don't think CREATED is a useful histogram value
andresp-chromium
2014/08/04 19:16:23
This was intended to be an events counter.. in suc
| |
19 USERMEDIAREQUEST_CANCELLED = 1, | |
20 USERMEDIAREQUEST_NO_RESPONSE = 2, | |
21 // Unused enum ids so they can be used to track events that don't exist in | |
22 // MediaStreamRequestResult without destroying existent mappings. | |
23 USERMEDIAREQUEST_RESULT = 10, | |
vrk (LEFT CHROMIUM)
2014/08/04 18:22:17
ISTM it'd make more sense to have two histograms:
andresp-chromium
2014/08/04 19:16:24
Totally agree.
On 2014/08/04 18:22:17, Victoria K
| |
24 NUM_USERMEDIAREQUEST_EVENTS = | |
25 USERMEDIAREQUEST_RESULT + NUM_MEDIA_REQUEST_RESULTS | |
26 }; | |
27 | |
28 void LogUserMediaRequestEvent(UserMediaRequestEvent event); | |
29 void LogUserMediaRequestResult(MediaStreamRequestResult result); | |
30 | |
14 // Helper enum used for histogramming calls to WebRTC APIs from JavaScript. | 31 // Helper enum used for histogramming calls to WebRTC APIs from JavaScript. |
15 enum JavaScriptAPIName { | 32 enum JavaScriptAPIName { |
16 WEBKIT_GET_USER_MEDIA, | 33 WEBKIT_GET_USER_MEDIA, |
17 WEBKIT_PEER_CONNECTION, | 34 WEBKIT_PEER_CONNECTION, |
18 WEBKIT_DEPRECATED_PEER_CONNECTION, | 35 WEBKIT_DEPRECATED_PEER_CONNECTION, |
19 WEBKIT_RTC_PEER_CONNECTION, | 36 WEBKIT_RTC_PEER_CONNECTION, |
20 WEBKIT_GET_MEDIA_DEVICES, | 37 WEBKIT_GET_MEDIA_DEVICES, |
21 INVALID_NAME | 38 INVALID_NAME |
22 }; | 39 }; |
23 | 40 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 | 91 |
75 int num_streams_; | 92 int num_streams_; |
76 bool has_used_api_[INVALID_NAME]; | 93 bool has_used_api_[INVALID_NAME]; |
77 | 94 |
78 DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics); | 95 DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics); |
79 }; | 96 }; |
80 | 97 |
81 } // namespace content | 98 } // namespace content |
82 | 99 |
83 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ | 100 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ |
OLD | NEW |