Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: chrome/browser/component_updater/widevine_cdm_component_installer.cc

Issue 17556002: Implement GetInstalledFile() in WidevineCdmComponentInstaller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a4cbe48b741f398d0bea2fd966729973cbdf2d77 100644
--- a/chrome/browser/component_updater/widevine_cdm_component_installer.cc
+++ b/chrome/browser/component_updater/widevine_cdm_component_installer.cc
@@ -251,7 +251,23 @@ bool WidevineCdmComponentInstaller::Install(
bool WidevineCdmComponentInstaller::GetInstalledFile(
const std::string& file, base::FilePath* installed_file) {
- return false;
+ // Only the CDM is component updated.
ddorwin 2013/06/21 17:54:49 tiny nit: component-updated
xhwang 2013/06/21 18:16:54 Done.
+ if (file != kWidevineCdmFileName)
+ return false;
+
+ // No CDM has been installed yet.
ddorwin 2013/06/21 17:54:49 This reads as a fact when it should describe the c
xhwang 2013/06/21 18:16:54 Done.
+ if (current_version_.Equals(base::Version(kNullVersion)))
+ return false;
+
+ base::FilePath installed_cdm_path =
+ GetWidevineCdmBaseDirectory().AppendASCII(current_version_.GetString())
+ .AppendASCII(kWidevineCdmFileName);
+
+ // Ideally we should check if PathExists(installed_cdm_path) here. But this
ddorwin 2013/06/21 17:54:49 What are the other implementations doing? Maybe th
xhwang 2013/06/21 18:16:54 I think I am the first one implementing this :) S
waffles 2013/06/21 18:23:24 We will have a failure with a more specific error
+ // thread does not allow IO.
+
+ *installed_file = installed_cdm_path;
+ return true;
}
void FinishWidevineCdmUpdateRegistration(ComponentUpdateService* cus,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698