| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" | 5 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 "x64"; | 76 "x64"; |
| 77 #else // TODO(viettrungluu): Support an ARM check? | 77 #else // TODO(viettrungluu): Support an ARM check? |
| 78 "???"; | 78 "???"; |
| 79 #endif | 79 #endif |
| 80 | 80 |
| 81 // The CDM manifest includes several custom values, all beginning with "x-cdm-". | 81 // The CDM manifest includes several custom values, all beginning with "x-cdm-". |
| 82 // All values are strings. | 82 // All values are strings. |
| 83 // All values that are lists are delimited by commas. No trailing commas. | 83 // All values that are lists are delimited by commas. No trailing commas. |
| 84 // For example, "1,2,4". | 84 // For example, "1,2,4". |
| 85 const char kCdmValueDelimiter = ','; | 85 const char kCdmValueDelimiter = ','; |
| 86 COMPILE_ASSERT(kCdmValueDelimiter == kCdmSupportedCodecsValueDelimiter, | 86 static_assert(kCdmValueDelimiter == kCdmSupportedCodecsValueDelimiter, |
| 87 cdm_delimiters_do_not_match); | 87 "cdm delimiters must match"); |
| 88 // The following entries are required. | 88 // The following entries are required. |
| 89 // Interface versions are lists of integers (e.g. "1" or "1,2,4"). | 89 // Interface versions are lists of integers (e.g. "1" or "1,2,4"). |
| 90 // These are checked in this file before registering the CDM. | 90 // These are checked in this file before registering the CDM. |
| 91 // All match the interface versions from content_decryption_module.h that the | 91 // All match the interface versions from content_decryption_module.h that the |
| 92 // CDM supports. | 92 // CDM supports. |
| 93 // Matches CDM_MODULE_VERSION. | 93 // Matches CDM_MODULE_VERSION. |
| 94 const char kCdmModuleVersionsName[] = "x-cdm-module-versions"; | 94 const char kCdmModuleVersionsName[] = "x-cdm-module-versions"; |
| 95 // Matches supported ContentDecryptionModule_* version(s). | 95 // Matches supported ContentDecryptionModule_* version(s). |
| 96 const char kCdmInterfaceVersionsName[] = "x-cdm-interface-versions"; | 96 const char kCdmInterfaceVersionsName[] = "x-cdm-interface-versions"; |
| 97 // Matches supported Host_* version(s). | 97 // Matches supported Host_* version(s). |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 // |cus| will take ownership of |installer| during installer->Register(cus). | 374 // |cus| will take ownership of |installer| during installer->Register(cus). |
| 375 DefaultComponentInstaller* installer = | 375 DefaultComponentInstaller* installer = |
| 376 new DefaultComponentInstaller(traits.Pass()); | 376 new DefaultComponentInstaller(traits.Pass()); |
| 377 installer->Register(cus); | 377 installer->Register(cus); |
| 378 #else | 378 #else |
| 379 return; | 379 return; |
| 380 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) | 380 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) |
| 381 } | 381 } |
| 382 | 382 |
| 383 } // namespace component_updater | 383 } // namespace component_updater |
| OLD | NEW |