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 <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "content/public/browser/plugin_service.h" | 31 #include "content/public/browser/plugin_service.h" |
32 #include "content/public/common/pepper_plugin_info.h" | 32 #include "content/public/common/pepper_plugin_info.h" |
33 #include "media/cdm/ppapi/supported_cdm_versions.h" | 33 #include "media/cdm/ppapi/supported_cdm_versions.h" |
34 #include "third_party/widevine/cdm/widevine_cdm_common.h" | 34 #include "third_party/widevine/cdm/widevine_cdm_common.h" |
35 | 35 |
36 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 36 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
37 | 37 |
38 using content::BrowserThread; | 38 using content::BrowserThread; |
39 using content::PluginService; | 39 using content::PluginService; |
40 | 40 |
| 41 namespace component_updater { |
| 42 |
41 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) | 43 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) |
42 | 44 |
43 namespace { | 45 namespace { |
44 | 46 |
45 // CRX hash. The extension id is: oimompecagnajdejgnnjijobebaeigek. | 47 // CRX hash. The extension id is: oimompecagnajdejgnnjijobebaeigek. |
46 const uint8 kSha2Hash[] = { 0xe8, 0xce, 0xcf, 0x42, 0x06, 0xd0, 0x93, 0x49, | 48 const uint8 kSha2Hash[] = { 0xe8, 0xce, 0xcf, 0x42, 0x06, 0xd0, 0x93, 0x49, |
47 0x6d, 0xd9, 0x89, 0xe1, 0x41, 0x04, 0x86, 0x4a, | 49 0x6d, 0xd9, 0x89, 0xe1, 0x41, 0x04, 0x86, 0x4a, |
48 0x8f, 0xbd, 0x86, 0x12, 0xb9, 0x58, 0x9b, 0xfb, | 50 0x8f, 0xbd, 0x86, 0x12, 0xb9, 0x58, 0x9b, 0xfb, |
49 0x4f, 0xbb, 0x1b, 0xa9, 0xd3, 0x85, 0x37, 0xef }; | 51 0x4f, 0xbb, 0x1b, 0xa9, 0xd3, 0x85, 0x37, 0xef }; |
50 | 52 |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 scoped_ptr<ComponentInstallerTraits> traits( | 330 scoped_ptr<ComponentInstallerTraits> traits( |
329 new WidevineCdmComponentInstallerTraits); | 331 new WidevineCdmComponentInstallerTraits); |
330 // |cus| will take ownership of |installer| during installer->Register(cus). | 332 // |cus| will take ownership of |installer| during installer->Register(cus). |
331 DefaultComponentInstaller* installer | 333 DefaultComponentInstaller* installer |
332 = new DefaultComponentInstaller(traits.Pass()); | 334 = new DefaultComponentInstaller(traits.Pass()); |
333 installer->Register(cus); | 335 installer->Register(cus); |
334 #else | 336 #else |
335 return; | 337 return; |
336 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) | 338 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) |
337 } | 339 } |
| 340 |
| 341 } // namespace component_updater |
| 342 |
OLD | NEW |