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

Unified Diff: media/base/key_systems.cc

Issue 875073004: Don't update Media.EME.KeySystemSupport UMA for unprefixed EME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO Created 5 years, 10 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: media/base/key_systems.cc
diff --git a/media/base/key_systems.cc b/media/base/key_systems.cc
index f97660c309eb700ac3c74b346e59ad7f647742ee..d4f43872218af86e85aeead326aa8a6528447457 100644
--- a/media/base/key_systems.cc
+++ b/media/base/key_systems.cc
@@ -120,7 +120,8 @@ class KeySystems {
bool IsSupportedKeySystemWithMediaMimeType(
const std::string& mime_type,
const std::vector<std::string>& codecs,
- const std::string& key_system);
+ const std::string& key_system,
+ bool reportToUma);
std::string GetKeySystemNameForUMA(const std::string& key_system) const;
@@ -475,7 +476,8 @@ bool KeySystems::IsSupportedKeySystemWithInitDataType(
bool KeySystems::IsSupportedKeySystemWithMediaMimeType(
const std::string& mime_type,
const std::vector<std::string>& codecs,
- const std::string& key_system) {
+ const std::string& key_system,
+ bool reportToUma) {
DCHECK(thread_checker_.CalledOnValidThread());
// If |key_system| is a parent key system, use its concrete child.
@@ -483,7 +485,8 @@ bool KeySystems::IsSupportedKeySystemWithMediaMimeType(
bool has_type = !mime_type.empty();
- key_systems_support_uma_.ReportKeySystemQuery(key_system, has_type);
+ if (reportToUma)
+ key_systems_support_uma_.ReportKeySystemQuery(key_system, has_type);
// Check key system support.
KeySystemPropertiesMap::const_iterator key_system_iter =
@@ -491,7 +494,8 @@ bool KeySystems::IsSupportedKeySystemWithMediaMimeType(
if (key_system_iter == concrete_key_system_map_.end())
return false;
- key_systems_support_uma_.ReportKeySystemSupport(key_system, false);
+ if (reportToUma)
+ key_systems_support_uma_.ReportKeySystemSupport(key_system, false);
if (!has_type) {
DCHECK(codecs.empty());
@@ -510,7 +514,8 @@ bool KeySystems::IsSupportedKeySystemWithMediaMimeType(
return false;
}
- key_systems_support_uma_.ReportKeySystemSupport(key_system, true);
+ if (reportToUma)
+ key_systems_support_uma_.ReportKeySystemSupport(key_system, true);
return true;
}
@@ -621,7 +626,15 @@ bool IsSupportedKeySystemWithMediaMimeType(
const std::vector<std::string>& codecs,
const std::string& key_system) {
return KeySystems::GetInstance().IsSupportedKeySystemWithMediaMimeType(
- mime_type, codecs, key_system);
+ mime_type, codecs, key_system, false);
+}
+
+bool PrefixedIsSupportedKeySystemWithMediaMimeType(
+ const std::string& mime_type,
+ const std::vector<std::string>& codecs,
+ const std::string& key_system) {
+ return KeySystems::GetInstance().IsSupportedKeySystemWithMediaMimeType(
+ mime_type, codecs, key_system, true);
}
std::string GetKeySystemNameForUMA(const std::string& key_system) {

Powered by Google App Engine
This is Rietveld 408576698