| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // Helper enum used for histogramming calls to WebRTC APIs from JavaScript. | 33 // Helper enum used for histogramming calls to WebRTC APIs from JavaScript. |
| 34 // The entries are linked to UMA values and cannot be changed. | 34 // The entries are linked to UMA values and cannot be changed. |
| 35 enum JavaScriptAPIName { | 35 enum JavaScriptAPIName { |
| 36 WEBKIT_GET_USER_MEDIA, | 36 WEBKIT_GET_USER_MEDIA, |
| 37 WEBKIT_PEER_CONNECTION, | 37 WEBKIT_PEER_CONNECTION, |
| 38 WEBKIT_DEPRECATED_PEER_CONNECTION, | 38 WEBKIT_DEPRECATED_PEER_CONNECTION, |
| 39 WEBKIT_RTC_PEER_CONNECTION, | 39 WEBKIT_RTC_PEER_CONNECTION, |
| 40 WEBKIT_GET_MEDIA_DEVICES, | 40 WEBKIT_GET_MEDIA_DEVICES, |
| 41 WEBKIT_MEDIA_STREAM_RECORDER, | 41 WEBKIT_MEDIA_STREAM_RECORDER, |
| 42 WEBKIT_CANVAS_CAPTURE_STREAM, | 42 WEBKIT_CANVAS_CAPTURE_STREAM, |
| 43 WEBKIT_VIDEO_CAPTURE_STREAM, |
| 43 INVALID_NAME | 44 INVALID_NAME |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 // Helper method used to collect information about the number of times | 47 // Helper method used to collect information about the number of times |
| 47 // different WebRTC APIs are called from JavaScript. | 48 // different WebRTC APIs are called from JavaScript. |
| 48 // | 49 // |
| 49 // This contributes to two histograms; the former is a raw count of | 50 // This contributes to two histograms; the former is a raw count of |
| 50 // the number of times the APIs are called, and be viewed at | 51 // the number of times the APIs are called, and be viewed at |
| 51 // chrome://histograms/WebRTC.webkitApiCount. | 52 // chrome://histograms/WebRTC.webkitApiCount. |
| 52 // | 53 // |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 97 |
| 97 int num_streams_; | 98 int num_streams_; |
| 98 bool has_used_api_[INVALID_NAME]; | 99 bool has_used_api_[INVALID_NAME]; |
| 99 | 100 |
| 100 DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics); | 101 DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics); |
| 101 }; | 102 }; |
| 102 | 103 |
| 103 } // namespace content | 104 } // namespace content |
| 104 | 105 |
| 105 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ | 106 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ |
| OLD | NEW |