Index: media/blink/webencryptedmediaclient_impl.h |
diff --git a/media/blink/webencryptedmediaclient_impl.h b/media/blink/webencryptedmediaclient_impl.h |
index 2b4e9d5de13cfe910878047c9409b7c12dc01500..afc2378cb42261d2b6ab3d054eb589b85f00bdd9 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); |
+ |
+ // Locate the Reporter for |key_system|. If not found return the one for |
+ // key system "Unknown". |
+ Reporter* LocateReporter(const std::string& key_system); |
sandersd (OOO until July 31)
2015/01/27 19:04:07
GetReporter()?
jrummell
2015/01/28 21:08:09
Done.
|
+ |
+ // Key system <-> Reporter map. |
+ typedef base::ScopedPtrHashMap<std::string, Reporter> Reporters; |
+ Reporters reporters_; |
+ |
scoped_ptr<CdmFactory> cdm_factory_; |
}; |