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

Unified Diff: media/blink/webencryptedmediaclient_impl.h

Issue 881853002: Add UMA to report requests for key systems using RequestMediaKeyAccess (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove line + rebase Created 5 years, 11 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
« no previous file with comments | « no previous file | media/blink/webencryptedmediaclient_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webencryptedmediaclient_impl.h
diff --git a/media/blink/webencryptedmediaclient_impl.h b/media/blink/webencryptedmediaclient_impl.h
index 7aadfc2238b4226d157be2648d27d5b9479c46fb..d101ecb9549caace1e1b9d4cd28c40519e8c7251 100644
--- a/media/blink/webencryptedmediaclient_impl.h
+++ b/media/blink/webencryptedmediaclient_impl.h
@@ -5,6 +5,9 @@
#ifndef MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_
#define MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_
+#include <string>
+
+#include "base/containers/scoped_ptr_hash_map.h"
#include "base/memory/scoped_ptr.h"
#include "media/base/cdm_factory.h"
#include "media/base/media_export.h"
@@ -27,6 +30,20 @@ class MEDIA_EXPORT WebEncryptedMediaClientImpl
blink::WebEncryptedMediaRequest request);
private:
+ // Report usage of key system to UMA. There are 2 different counts logged:
+ // 1. The key system is requested.
+ // 2. The requested key system and options are supported.
+ // Each stat is only reported once per renderer frame per key system.
+ class Reporter;
+
+ // Gets the Reporter for |key_system|. If it doesn't already exist,
+ // create one.
+ Reporter* GetReporter(const std::string& key_system);
+
+ // Key system <-> Reporter map.
+ typedef base::ScopedPtrHashMap<std::string, Reporter> Reporters;
+ Reporters reporters_;
+
scoped_ptr<CdmFactory> cdm_factory_;
};
« no previous file with comments | « no previous file | media/blink/webencryptedmediaclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698