| Index: media/base/mime_util.cc
|
| diff --git a/media/base/mime_util.cc b/media/base/mime_util.cc
|
| index 6eba4fc70b70bf5485708538558659fc858612e7..ba5905d2f4a5d7346af7909099959d6b675f0568 100644
|
| --- a/media/base/mime_util.cc
|
| +++ b/media/base/mime_util.cc
|
| @@ -4,40 +4,39 @@
|
|
|
| #include "media/base/mime_util.h"
|
|
|
| -#include "base/lazy_instance.h"
|
| #include "media/base/mime_util_internal.h"
|
|
|
| namespace media {
|
|
|
| // This variable is Leaky because it is accessed from WorkerPool threads.
|
| -static base::LazyInstance<internal::MimeUtil>::Leaky g_media_mime_util =
|
| - LAZY_INSTANCE_INITIALIZER;
|
| +static internal::MimeUtil* GetMimeUtil() {
|
| + static internal::MimeUtil* mime_util = new internal::MimeUtil();
|
| + return mime_util;
|
| +}
|
|
|
| bool IsSupportedMediaMimeType(const std::string& mime_type) {
|
| - return g_media_mime_util.Pointer()->IsSupportedMediaMimeType(mime_type);
|
| + return GetMimeUtil()->IsSupportedMediaMimeType(mime_type);
|
| }
|
|
|
| SupportsType IsSupportedMediaFormat(const std::string& mime_type,
|
| const std::vector<std::string>& codecs) {
|
| - return g_media_mime_util.Pointer()->IsSupportedMediaFormat(mime_type, codecs,
|
| - false);
|
| + return GetMimeUtil()->IsSupportedMediaFormat(mime_type, codecs, false);
|
| }
|
|
|
| SupportsType IsSupportedEncryptedMediaFormat(
|
| const std::string& mime_type,
|
| const std::vector<std::string>& codecs) {
|
| - return g_media_mime_util.Pointer()->IsSupportedMediaFormat(mime_type, codecs,
|
| - true);
|
| + return GetMimeUtil()->IsSupportedMediaFormat(mime_type, codecs, true);
|
| }
|
|
|
| void ParseCodecString(const std::string& codecs,
|
| std::vector<std::string>* codecs_out,
|
| bool strip) {
|
| - g_media_mime_util.Pointer()->ParseCodecString(codecs, codecs_out, strip);
|
| + GetMimeUtil()->ParseCodecString(codecs, codecs_out, strip);
|
| }
|
|
|
| void RemoveProprietaryMediaTypesAndCodecsForTests() {
|
| - g_media_mime_util.Pointer()->RemoveProprietaryMediaTypesAndCodecs();
|
| + GetMimeUtil()->RemoveProprietaryMediaTypesAndCodecs();
|
| }
|
|
|
| } // namespace media
|
|
|