Skip to content

Commit

Permalink
Merge pull request #511 from brave/widevine_cdm_component_installer
Browse files Browse the repository at this point in the history
Remove duplicate definition added by #509
  • Loading branch information
darkdh committed Sep 26, 2018
1 parent 753561a commit 374d83c
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,19 @@ void RegisterAndInstallWidevine() {
base::Bind(&OnWidevineRegistered));
}

#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)

// Do nothing unless the user opts in!
void RegisterWidevineCdmComponent(ComponentUpdateService* cus) {
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)
DCHECK_CURRENTLY_ON(BrowserThread::UI);
PrefService* prefs = ProfileManager::GetActiveUserProfile()->GetPrefs();
bool widevine_opted_in =
prefs->GetBoolean(kWidevineOptedIn);
if (widevine_opted_in) {
RegisterAndInstallWidevine();
}
}

#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)

void RegisterWidevineCdmComponent(ComponentUpdateService* cus) {
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)
auto installer = base::MakeRefCounted<ComponentInstaller>(
std::make_unique<WidevineCdmComponentInstallerPolicy>());
installer->Register(cus, base::OnceClosure());
#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)
}

} // namespace component_updater

0 comments on commit 374d83c

Please sign in to comment.