| 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 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 // Helper enum used for histogramming calls to WebRTC APIs from JavaScript. | 14 // Helper enum used for histogramming calls to WebRTC APIs from JavaScript. |
| 15 enum JavaScriptAPIName { | 15 enum JavaScriptAPIName { |
| 16 WEBKIT_GET_USER_MEDIA, | 16 WEBKIT_GET_USER_MEDIA, |
| 17 WEBKIT_PEER_CONNECTION, | 17 WEBKIT_PEER_CONNECTION, |
| 18 WEBKIT_DEPRECATED_PEER_CONNECTION, | 18 WEBKIT_DEPRECATED_PEER_CONNECTION, |
| 19 WEBKIT_RTC_PEER_CONNECTION, | 19 WEBKIT_RTC_PEER_CONNECTION, |
| 20 WEBKIT_GET_MEDIA_DEVICES, | |
| 21 INVALID_NAME | 20 INVALID_NAME |
| 22 }; | 21 }; |
| 23 | 22 |
| 24 // Helper method used to collect information about the number of times | 23 // Helper method used to collect information about the number of times |
| 25 // different WebRTC APIs are called from JavaScript. | 24 // different WebRTC APIs are called from JavaScript. |
| 26 // | 25 // |
| 27 // This contributes to two histograms; the former is a raw count of | 26 // This contributes to two histograms; the former is a raw count of |
| 28 // the number of times the APIs are called, and be viewed at | 27 // the number of times the APIs are called, and be viewed at |
| 29 // chrome://histograms/WebRTC.webkitApiCount. | 28 // chrome://histograms/WebRTC.webkitApiCount. |
| 30 // | 29 // |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 73 |
| 75 int num_streams_; | 74 int num_streams_; |
| 76 bool has_used_api_[INVALID_NAME]; | 75 bool has_used_api_[INVALID_NAME]; |
| 77 | 76 |
| 78 DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics); | 77 DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics); |
| 79 }; | 78 }; |
| 80 | 79 |
| 81 } // namespace content | 80 } // namespace content |
| 82 | 81 |
| 83 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ | 82 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ |
| OLD | NEW |