Chromium Code Reviews| 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 #include "content/public/common/media_stream_request.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 // Used to investigate where UserMediaRequests end up. | |
| 16 // Only UserMediaRequests that do not log with LogUserMediaRequestResult | |
| 17 // should call LogUserMediaRequestWithNoResult. | |
| 18 // | |
| 19 // Elements in this enum should not be deleted or rearranged; the only permitted | |
| 20 // operation is to add new elements to the end. | |
|
tommi (sloooow) - chröme
2014/08/06 11:42:21
to the end or before NUM_MEDIA_STREAM_REQUEST_WITH
andresp-chromium
2014/08/06 11:59:14
NUM_MEDIA_STREAM_REQUEST_WITH_NO_RESULT
| |
| 21 enum MediaStreamRequestState { | |
| 22 MEDIA_STREAM_REQUEST_EXPLICITLY_CANCELLED = 0, | |
|
tommi (sloooow) - chröme
2014/08/06 11:42:21
too much indent
andresp-chromium
2014/08/06 11:59:14
Done.
| |
| 23 MEDIA_STREAM_REQUEST_NOT_GENERATED = 1, | |
| 24 MEDIA_STREAM_REQUEST_PENDING_MEDIA_TRACKS = 2, | |
| 25 NUM_MEDIA_STREAM_REQUEST_WITH_NO_RESULT | |
| 26 }; | |
| 27 | |
| 28 void LogUserMediaRequestWithNoResult(MediaStreamRequestState state); | |
| 15 void LogUserMediaRequestResult(MediaStreamRequestResult result); | 29 void LogUserMediaRequestResult(MediaStreamRequestResult result); |
| 16 | 30 |
| 17 // Helper enum used for histogramming calls to WebRTC APIs from JavaScript. | 31 // Helper enum used for histogramming calls to WebRTC APIs from JavaScript. |
| 18 enum JavaScriptAPIName { | 32 enum JavaScriptAPIName { |
| 19 WEBKIT_GET_USER_MEDIA, | 33 WEBKIT_GET_USER_MEDIA, |
| 20 WEBKIT_PEER_CONNECTION, | 34 WEBKIT_PEER_CONNECTION, |
| 21 WEBKIT_DEPRECATED_PEER_CONNECTION, | 35 WEBKIT_DEPRECATED_PEER_CONNECTION, |
| 22 WEBKIT_RTC_PEER_CONNECTION, | 36 WEBKIT_RTC_PEER_CONNECTION, |
| 23 WEBKIT_GET_MEDIA_DEVICES, | 37 WEBKIT_GET_MEDIA_DEVICES, |
| 24 INVALID_NAME | 38 INVALID_NAME |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 | 91 |
| 78 int num_streams_; | 92 int num_streams_; |
| 79 bool has_used_api_[INVALID_NAME]; | 93 bool has_used_api_[INVALID_NAME]; |
| 80 | 94 |
| 81 DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics); | 95 DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics); |
| 82 }; | 96 }; |
| 83 | 97 |
| 84 } // namespace content | 98 } // namespace content |
| 85 | 99 |
| 86 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ | 100 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ |
| OLD | NEW |