| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 } // namespace | 242 } // namespace |
| 243 | 243 |
| 244 class WidevineCdmComponentInstallerTraits : public ComponentInstallerTraits { | 244 class WidevineCdmComponentInstallerTraits : public ComponentInstallerTraits { |
| 245 public: | 245 public: |
| 246 WidevineCdmComponentInstallerTraits(); | 246 WidevineCdmComponentInstallerTraits(); |
| 247 ~WidevineCdmComponentInstallerTraits() override {} | 247 ~WidevineCdmComponentInstallerTraits() override {} |
| 248 | 248 |
| 249 private: | 249 private: |
| 250 // The following methods override ComponentInstallerTraits. | 250 // The following methods override ComponentInstallerTraits. |
| 251 bool CanAutoUpdate() const override; | 251 bool SupportsGroupPolicyEnabledComponentUpdates() const override; |
| 252 bool RequiresNetworkEncryption() const override; | 252 bool RequiresNetworkEncryption() const override; |
| 253 bool OnCustomInstall(const base::DictionaryValue& manifest, | 253 bool OnCustomInstall(const base::DictionaryValue& manifest, |
| 254 const base::FilePath& install_dir) override; | 254 const base::FilePath& install_dir) override; |
| 255 bool VerifyInstallation( | 255 bool VerifyInstallation( |
| 256 const base::DictionaryValue& manifest, | 256 const base::DictionaryValue& manifest, |
| 257 const base::FilePath& install_dir) const override; | 257 const base::FilePath& install_dir) const override; |
| 258 void ComponentReady(const base::Version& version, | 258 void ComponentReady(const base::Version& version, |
| 259 const base::FilePath& path, | 259 const base::FilePath& path, |
| 260 std::unique_ptr<base::DictionaryValue> manifest) override; | 260 std::unique_ptr<base::DictionaryValue> manifest) override; |
| 261 base::FilePath GetRelativeInstallDir() const override; | 261 base::FilePath GetRelativeInstallDir() const override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 272 void UpdateCdmAdapter(const base::Version& cdm_version, | 272 void UpdateCdmAdapter(const base::Version& cdm_version, |
| 273 const base::FilePath& cdm_install_dir, | 273 const base::FilePath& cdm_install_dir, |
| 274 std::unique_ptr<base::DictionaryValue> manifest); | 274 std::unique_ptr<base::DictionaryValue> manifest); |
| 275 | 275 |
| 276 DISALLOW_COPY_AND_ASSIGN(WidevineCdmComponentInstallerTraits); | 276 DISALLOW_COPY_AND_ASSIGN(WidevineCdmComponentInstallerTraits); |
| 277 }; | 277 }; |
| 278 | 278 |
| 279 WidevineCdmComponentInstallerTraits::WidevineCdmComponentInstallerTraits() { | 279 WidevineCdmComponentInstallerTraits::WidevineCdmComponentInstallerTraits() { |
| 280 } | 280 } |
| 281 | 281 |
| 282 bool WidevineCdmComponentInstallerTraits::CanAutoUpdate() const { | 282 bool WidevineCdmComponentInstallerTraits:: |
| 283 return true; | 283 SupportsGroupPolicyEnabledComponentUpdates() const { |
| 284 return false; |
| 284 } | 285 } |
| 285 | 286 |
| 286 bool WidevineCdmComponentInstallerTraits::RequiresNetworkEncryption() const { | 287 bool WidevineCdmComponentInstallerTraits::RequiresNetworkEncryption() const { |
| 287 return false; | 288 return false; |
| 288 } | 289 } |
| 289 | 290 |
| 290 bool WidevineCdmComponentInstallerTraits::OnCustomInstall( | 291 bool WidevineCdmComponentInstallerTraits::OnCustomInstall( |
| 291 const base::DictionaryValue& manifest, | 292 const base::DictionaryValue& manifest, |
| 292 const base::FilePath& install_dir) { | 293 const base::FilePath& install_dir) { |
| 293 return true; | 294 return true; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 std::unique_ptr<ComponentInstallerTraits> traits( | 414 std::unique_ptr<ComponentInstallerTraits> traits( |
| 414 new WidevineCdmComponentInstallerTraits); | 415 new WidevineCdmComponentInstallerTraits); |
| 415 // |cus| will take ownership of |installer| during installer->Register(cus). | 416 // |cus| will take ownership of |installer| during installer->Register(cus). |
| 416 DefaultComponentInstaller* installer = | 417 DefaultComponentInstaller* installer = |
| 417 new DefaultComponentInstaller(std::move(traits)); | 418 new DefaultComponentInstaller(std::move(traits)); |
| 418 installer->Register(cus, base::Closure()); | 419 installer->Register(cus, base::Closure()); |
| 419 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) | 420 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) |
| 420 } | 421 } |
| 421 | 422 |
| 422 } // namespace component_updater | 423 } // namespace component_updater |
| OLD | NEW |