Skip to content

Commit

Permalink
Merge pull request #7780 from brave/android_cast
Browse files Browse the repository at this point in the history
fixes cast on Android
  • Loading branch information
SergeyZhukovsky authored Feb 3, 2021
2 parents 883a74d + 280d4cc commit 5b0f721
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ void UpdateMediaRouterPref(content::BrowserContext* context) {
}

bool MediaRouterEnabled(content::BrowserContext* context) {
#if defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
#if defined(OS_ANDROID)
return MediaRouterEnabled_ChromiumImpl(context);
#elif BUILDFLAG(ENABLE_EXTENSIONS)
UpdateMediaRouterPref(context);
const PrefService::Preference* pref = GetMediaRouterPref(context);
bool allowed = false;
Expand All @@ -35,9 +37,9 @@ bool MediaRouterEnabled(content::BrowserContext* context) {
// The component extension cannot be loaded in guest sessions.
// crbug.com/756243
return allowed && !Profile::FromBrowserContext(context)->IsGuestSession();
#else // !(defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS))
#else
return false;
#endif // defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
#endif // defined(OS_ANDROID)
}

} // namespace media_router

0 comments on commit 5b0f721

Please sign in to comment.