From 374d83c08012f1bb348a758d5b3b78454a9baca5 Mon Sep 17 00:00:00 2001 From: Anthony Tseng Date: Wed, 26 Sep 2018 16:31:45 -0700 Subject: [PATCH] Merge pull request #511 from brave/widevine_cdm_component_installer Remove duplicate definition added by https://github.com/brave/brave-core/pull/509 --- .../widevine_cdm_component_installer.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/chromium_src/chrome/browser/component_updater/widevine_cdm_component_installer.cc b/chromium_src/chrome/browser/component_updater/widevine_cdm_component_installer.cc index 6c2370d8f302..bc8a0fac59eb 100644 --- a/chromium_src/chrome/browser/component_updater/widevine_cdm_component_installer.cc +++ b/chromium_src/chrome/browser/component_updater/widevine_cdm_component_installer.cc @@ -36,8 +36,11 @@ 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 = @@ -45,15 +48,7 @@ void RegisterWidevineCdmComponent(ComponentUpdateService* cus) { 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( - std::make_unique()); - installer->Register(cus, base::OnceClosure()); #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) } + } // namespace component_updater