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

Side by Side Diff: media/base/key_systems.h

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: Move comment 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 unified diff | Download patch
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | media/base/key_systems.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_KEY_SYSTEMS_H_ 5 #ifndef MEDIA_BASE_KEY_SYSTEMS_H_
6 #define MEDIA_BASE_KEY_SYSTEMS_H_ 6 #define MEDIA_BASE_KEY_SYSTEMS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const std::string& init_data_type); 45 const std::string& init_data_type);
46 46
47 // Returns whether |key_system| is a real supported key system that can be 47 // Returns whether |key_system| is a real supported key system that can be
48 // instantiated. 48 // instantiated.
49 // Abstract parent |key_system| strings will return false. 49 // Abstract parent |key_system| strings will return false.
50 // Call IsSupportedKeySystemWithMediaMimeType() to determine whether a 50 // Call IsSupportedKeySystemWithMediaMimeType() to determine whether a
51 // |key_system| supports a specific type of media or to check parent key 51 // |key_system| supports a specific type of media or to check parent key
52 // systems. 52 // systems.
53 MEDIA_EXPORT bool IsConcreteSupportedKeySystem(const std::string& key_system); 53 MEDIA_EXPORT bool IsConcreteSupportedKeySystem(const std::string& key_system);
54 54
55 // Returns whether |key_sytem| supports the specified media type and codec(s). 55 // Returns whether |key_system| supports the specified media type and codec(s).
56 MEDIA_EXPORT bool IsSupportedKeySystemWithMediaMimeType( 56 MEDIA_EXPORT bool IsSupportedKeySystemWithMediaMimeType(
57 const std::string& mime_type, 57 const std::string& mime_type,
58 const std::vector<std::string>& codecs, 58 const std::vector<std::string>& codecs,
59 const std::string& key_system); 59 const std::string& key_system);
60 60
61 // Returns whether |key_system| supports the specified media type and codec(s).
62 // To be used with prefixed EME only as it generates UMAs based on the query.
63 MEDIA_EXPORT bool PrefixedIsSupportedKeySystemWithMediaMimeType(
64 const std::string& mime_type,
65 const std::vector<std::string>& codecs,
66 const std::string& key_system);
67
61 // Returns a name for |key_system| suitable to UMA logging. 68 // Returns a name for |key_system| suitable to UMA logging.
62 MEDIA_EXPORT std::string GetKeySystemNameForUMA(const std::string& key_system); 69 MEDIA_EXPORT std::string GetKeySystemNameForUMA(const std::string& key_system);
63 70
64 // Returns whether AesDecryptor can be used for the given |concrete_key_system|. 71 // Returns whether AesDecryptor can be used for the given |concrete_key_system|.
65 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system); 72 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system);
66 73
67 #if defined(ENABLE_PEPPER_CDMS) 74 #if defined(ENABLE_PEPPER_CDMS)
68 // Returns the Pepper MIME type for |concrete_key_system|. 75 // Returns the Pepper MIME type for |concrete_key_system|.
69 // Returns empty string if |concrete_key_system| is unknown or not Pepper-based. 76 // Returns empty string if |concrete_key_system| is unknown or not Pepper-based.
70 MEDIA_EXPORT std::string GetPepperType( 77 MEDIA_EXPORT std::string GetPepperType(
71 const std::string& concrete_key_system); 78 const std::string& concrete_key_system);
72 #endif 79 #endif
73 80
74 #if defined(UNIT_TEST) 81 #if defined(UNIT_TEST)
75 // Helper functions to add container/codec types for testing purposes. 82 // Helper functions to add container/codec types for testing purposes.
76 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask); 83 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask);
77 MEDIA_EXPORT void AddCodecMask(const std::string& codec, uint32 mask); 84 MEDIA_EXPORT void AddCodecMask(const std::string& codec, uint32 mask);
78 #endif // defined(UNIT_TEST) 85 #endif // defined(UNIT_TEST)
79 86
80 } // namespace media 87 } // namespace media
81 88
82 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ 89 #endif // MEDIA_BASE_KEY_SYSTEMS_H_
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | media/base/key_systems.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698