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

Unified Diff: content/renderer/media/webrtc_uma_histograms.h

Issue 10919122: Move creation of PeerConnection from the RenderView to the RenderThreadImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding missing files content/renderer/media/webrtc_uma_histograms.h Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webrtc_uma_histograms.h
diff --git a/content/renderer/media/webrtc_uma_histograms.h b/content/renderer/media/webrtc_uma_histograms.h
new file mode 100644
index 0000000000000000000000000000000000000000..f37847e3d54879f524baefaeb3c6ae711e80bc03
--- /dev/null
+++ b/content/renderer/media/webrtc_uma_histograms.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_
+#define CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_
+
+#include "base/metrics/histogram.h"
+
+namespace {
+
+// Helper enum used for histogramming calls to WebRTC APIs from JavaScript.
+enum JavaScriptAPIName {
+ kWebkitGetUserMedia,
tommi (sloooow) - chröme 2012/09/12 13:10:24 follow chrome style
perkj_chrome 2012/09/12 13:54:39 Done.
+ kWebkitPeerConnection,
+ kInvalidName
+};
+
+// Helper method used to collect information about the number of times
+// different WebRTC API:s are called from JavaScript.
+// The histogram can be viewed at chrome://histograms/WebRTC.webkitApiCount.
+void UpdateWebRTCMethodCount(JavaScriptAPIName api_name) {
+ UMA_HISTOGRAM_ENUMERATION("WebRTC.webkitApiCount", api_name, kInvalidName);
+}
+
+} // namespace
+
+#endif // CONTENT_RENDERER_MEDIA_WEBRTC_UMA_HISTOGRAMS_H_
« no previous file with comments | « content/renderer/media/peer_connection_handler_jsep_unittest.cc ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698