| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 231 |
| 232 } // namespace | 232 } // namespace |
| 233 | 233 |
| 234 class WidevineCdmComponentInstallerTraits : public ComponentInstallerTraits { | 234 class WidevineCdmComponentInstallerTraits : public ComponentInstallerTraits { |
| 235 public: | 235 public: |
| 236 WidevineCdmComponentInstallerTraits(); | 236 WidevineCdmComponentInstallerTraits(); |
| 237 virtual ~WidevineCdmComponentInstallerTraits() {} | 237 virtual ~WidevineCdmComponentInstallerTraits() {} |
| 238 | 238 |
| 239 private: | 239 private: |
| 240 // The following methods override ComponentInstallerTraits. | 240 // The following methods override ComponentInstallerTraits. |
| 241 virtual bool CanAutoUpdate() const OVERRIDE; | 241 virtual bool CanAutoUpdate() const override; |
| 242 virtual bool OnCustomInstall(const base::DictionaryValue& manifest, | 242 virtual bool OnCustomInstall(const base::DictionaryValue& manifest, |
| 243 const base::FilePath& install_dir) OVERRIDE; | 243 const base::FilePath& install_dir) override; |
| 244 virtual bool VerifyInstallation( | 244 virtual bool VerifyInstallation( |
| 245 const base::DictionaryValue& manifest, | 245 const base::DictionaryValue& manifest, |
| 246 const base::FilePath& install_dir) const OVERRIDE; | 246 const base::FilePath& install_dir) const override; |
| 247 virtual void ComponentReady( | 247 virtual void ComponentReady( |
| 248 const base::Version& version, | 248 const base::Version& version, |
| 249 const base::FilePath& path, | 249 const base::FilePath& path, |
| 250 scoped_ptr<base::DictionaryValue> manifest) OVERRIDE; | 250 scoped_ptr<base::DictionaryValue> manifest) override; |
| 251 virtual base::FilePath GetBaseDirectory() const OVERRIDE; | 251 virtual base::FilePath GetBaseDirectory() const override; |
| 252 virtual void GetHash(std::vector<uint8_t>* hash) const OVERRIDE; | 252 virtual void GetHash(std::vector<uint8_t>* hash) const override; |
| 253 virtual std::string GetName() const OVERRIDE; | 253 virtual std::string GetName() const override; |
| 254 | 254 |
| 255 // Checks and updates CDM adapter if necessary to make sure the latest CDM | 255 // Checks and updates CDM adapter if necessary to make sure the latest CDM |
| 256 // adapter is always used. | 256 // adapter is always used. |
| 257 // Note: The component is ready when CDM is present, but the CDM won't be | 257 // Note: The component is ready when CDM is present, but the CDM won't be |
| 258 // registered until the adapter is copied by this function (see | 258 // registered until the adapter is copied by this function (see |
| 259 // VerifyInstallation). | 259 // VerifyInstallation). |
| 260 void UpdateCdmAdapter(const base::Version& cdm_version, | 260 void UpdateCdmAdapter(const base::Version& cdm_version, |
| 261 const base::FilePath& cdm_install_dir, | 261 const base::FilePath& cdm_install_dir, |
| 262 scoped_ptr<base::DictionaryValue> manifest); | 262 scoped_ptr<base::DictionaryValue> manifest); |
| 263 | 263 |
| (...skipping 110 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 |