Chromium Code Reviews| Index: content/renderer/media/webcontentdecryptionmodulesession_impl.cc |
| diff --git a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc |
| index 65975186a5f7185310f928fec0ef84dfc9331d61..89ca4fb8a3bad8514f8d3e876f37c012ae0ab7ba 100644 |
| --- a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc |
| +++ b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc |
| @@ -97,9 +97,19 @@ void WebContentDecryptionModuleSessionImpl::initializeNewSession( |
| } |
| std::string init_data_type_as_ascii = base::UTF16ToASCII(init_data_type); |
| - DLOG_IF(WARNING, init_data_type_as_ascii.find('/') != std::string::npos) |
| - << "init_data_type '" << init_data_type_as_ascii |
| - << "' may be a MIME type"; |
| + |
| + if (init_data_type_as_ascii.find('/') != std::string::npos) { |
| + DLOG(WARNING) << "init_data_type '" << init_data_type_as_ascii |
|
ddorwin
2014/08/13 20:59:54
IIRC, the DLOG_IF was a heads up that you may have
sandersd (OOO until July 31)
2014/08/13 21:36:19
Done.
|
| + << "' may be a MIME type"; |
| + // Attempt to translate content types. |
| + // TODO(sandersd): Move to ProxyDecryptor. http://crbug.com/385874 |
|
ddorwin
2014/08/13 20:59:55
When? After converting the prefixed APIs and tests
sandersd (OOO until July 31)
2014/08/13 21:36:19
Done.
|
| + if (init_data_type_as_ascii == "audio/mp4" || |
|
ddorwin
2014/08/13 20:59:54
Use braces for this complex multi-line conditional
sandersd (OOO until July 31)
2014/08/13 21:36:19
Done.
|
| + init_data_type_as_ascii == "video/mp4") |
| + init_data_type_as_ascii = "cenc"; |
| + else if (init_data_type_as_ascii == "audio/webm" || |
| + init_data_type_as_ascii == "video/webm") |
| + init_data_type_as_ascii = "webm"; |
| + } |
| scoped_ptr<media::NewSessionCdmPromise> promise( |
| new media::NewSessionCdmPromise( |