Chromium Code Reviews| Index: chrome/browser/component_updater/widevine_cdm_component_installer.cc |
| diff --git a/chrome/browser/component_updater/widevine_cdm_component_installer.cc b/chrome/browser/component_updater/widevine_cdm_component_installer.cc |
| index 8bc3feff3eb36b62cbff0a79e7057ef370cc35b2..eb434ac52f141d4ee2a682a64209d12d958be53c 100644 |
| --- a/chrome/browser/component_updater/widevine_cdm_component_installer.cc |
| +++ b/chrome/browser/component_updater/widevine_cdm_component_installer.cc |
| @@ -251,7 +251,22 @@ bool WidevineCdmComponentInstaller::Install( |
| bool WidevineCdmComponentInstaller::GetInstalledFile( |
| const std::string& file, base::FilePath* installed_file) { |
| - return false; |
| + // Only the CDM is component-updated. |
| + if (file != kWidevineCdmFileName) |
| + return false; |
| + |
| + if (current_version_.Equals(base::Version(kNullVersion))) |
| + return false; // No CDM has been installed yet. |
| + |
| + base::FilePath installed_cdm_path = |
| + GetWidevineCdmBaseDirectory().AppendASCII(current_version_.GetString()) |
| + .AppendASCII(kWidevineCdmFileName); |
| + |
| + // Ideally we should check if PathExists(installed_cdm_path) here. But this |
|
Sorin Jianu
2013/06/21 19:49:24
This comment can be removed. The function just map
xhwang
2013/06/21 19:56:04
Done.
|
| + // thread does not allow IO. |
| + |
| + *installed_file = installed_cdm_path; |
| + return true; |
| } |
| void FinishWidevineCdmUpdateRegistration(ComponentUpdateService* cus, |