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

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: 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 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_;
};
« 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