Commit 0dce7c87 authored by teravest@chromium.org's avatar teravest@chromium.org

Pepper: Allow Compositor and VideoDecode on dev channel.

An earlier change to narrow the whitelisting behavior for the Compositor and
VideoDecode APIs enforced whitelisting, but removed the channel version check
which permits use of these API on dev and canary builds of Chrome.
https://codereview.chromium.org/346263006

This fixes that regression (and highlights the need for better testing for API
permissions).

BUG=

Review URL: https://codereview.chromium.org/378353002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282333 0039d316-1c4b-4281-b951-d872f2087c98
parent 90e42c73
......@@ -1480,7 +1480,11 @@ bool ChromeContentRendererClient::IsPluginAllowedToUseCompositorAPI(
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnablePepperTesting))
return true;
return IsExtensionOrSharedModuleWhitelisted(url, allowed_compositor_origins_);
if (IsExtensionOrSharedModuleWhitelisted(url, allowed_compositor_origins_))
return true;
chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
return channel <= chrome::VersionInfo::CHANNEL_DEV;
#else
return false;
#endif
......@@ -1492,8 +1496,12 @@ bool ChromeContentRendererClient::IsPluginAllowedToUseVideoDecodeAPI(
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnablePepperTesting))
return true;
return IsExtensionOrSharedModuleWhitelisted(url,
allowed_video_decode_origins_);
if (IsExtensionOrSharedModuleWhitelisted(url, allowed_video_decode_origins_))
return true;
chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
return channel <= chrome::VersionInfo::CHANNEL_DEV;
#else
return false;
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment