Index: media/blink/webencryptedmediaclient_impl.h |
diff --git a/media/blink/webencryptedmediaclient_impl.h b/media/blink/webencryptedmediaclient_impl.h |
index 2b4e9d5de13cfe910878047c9409b7c12dc01500..e3e67992bd35a23460efed462b383c77a8432211 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" |
@@ -24,6 +27,23 @@ 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 process per key system. |
+ class Reporter; |
+ |
+ // Add a Reporter for |key_system| to the map. |
+ void AddReporter(const std::string& key_system); |
+ |
+ // Gets the Reporter for |key_system|. If not found return the one for |
+ // key system "Unknown". |
+ 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_; |
}; |