Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(837)

Side by Side Diff: content/renderer/media/webrtc_uma_histograms.h

Issue 1371933005: MediaStream Recorder: add usage counter to WebRTC.webkitApiCount UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 12 matching lines...) Expand all
23 MEDIA_STREAM_REQUEST_EXPLICITLY_CANCELLED = 0, 23 MEDIA_STREAM_REQUEST_EXPLICITLY_CANCELLED = 0,
24 MEDIA_STREAM_REQUEST_NOT_GENERATED = 1, 24 MEDIA_STREAM_REQUEST_NOT_GENERATED = 1,
25 MEDIA_STREAM_REQUEST_PENDING_MEDIA_TRACKS = 2, 25 MEDIA_STREAM_REQUEST_PENDING_MEDIA_TRACKS = 2,
26 NUM_MEDIA_STREAM_REQUEST_WITH_NO_RESULT 26 NUM_MEDIA_STREAM_REQUEST_WITH_NO_RESULT
27 }; 27 };
28 28
29 void LogUserMediaRequestWithNoResult(MediaStreamRequestState state); 29 void LogUserMediaRequestWithNoResult(MediaStreamRequestState state);
30 void LogUserMediaRequestResult(MediaStreamRequestResult result); 30 void LogUserMediaRequestResult(MediaStreamRequestResult result);
31 31
32 // Helper enum used for histogramming calls to WebRTC APIs from JavaScript. 32 // Helper enum used for histogramming calls to WebRTC APIs from JavaScript.
33 // The entries are linked to UMA values and cannot be changed.
33 enum JavaScriptAPIName { 34 enum JavaScriptAPIName {
34 WEBKIT_GET_USER_MEDIA, 35 WEBKIT_GET_USER_MEDIA,
35 WEBKIT_PEER_CONNECTION, 36 WEBKIT_PEER_CONNECTION,
36 WEBKIT_DEPRECATED_PEER_CONNECTION, 37 WEBKIT_DEPRECATED_PEER_CONNECTION,
37 WEBKIT_RTC_PEER_CONNECTION, 38 WEBKIT_RTC_PEER_CONNECTION,
38 WEBKIT_GET_MEDIA_DEVICES, 39 WEBKIT_GET_MEDIA_DEVICES,
40 WEBKIT_MEDIA_STREAM_RECORDER,
39 INVALID_NAME 41 INVALID_NAME
40 }; 42 };
41 43
42 // Helper method used to collect information about the number of times 44 // Helper method used to collect information about the number of times
43 // different WebRTC APIs are called from JavaScript. 45 // different WebRTC APIs are called from JavaScript.
44 // 46 //
45 // This contributes to two histograms; the former is a raw count of 47 // This contributes to two histograms; the former is a raw count of
46 // the number of times the APIs are called, and be viewed at 48 // the number of times the APIs are called, and be viewed at
47 // chrome://histograms/WebRTC.webkitApiCount. 49 // chrome://histograms/WebRTC.webkitApiCount.
48 // 50 //
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 94
93 int num_streams_; 95 int num_streams_;
94 bool has_used_api_[INVALID_NAME]; 96 bool has_used_api_[INVALID_NAME];
95 97
96 DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics); 98 DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics);
97 }; 99 };
98 100
99 } // namespace content 101 } // namespace content
100 102
101 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_ 103 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_recorder_handler.cc ('k') | content/renderer/media/webrtc_uma_histograms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698