Chromium Code Reviews| Index: chrome/browser/chrome_content_browser_client.cc |
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
| index 099a6484a25350aee9229ccd3e0fa9c0c4f16181..63d6ea8c7a4f01c131d826926ccf67f86553e919 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -140,6 +140,7 @@ |
| #include "net/cookies/cookie_options.h" |
| #include "net/ssl/ssl_cert_request_info.h" |
| #include "ppapi/host/ppapi_host.h" |
| +#include "ppapi/shared_impl/ppapi_switches.h" |
| #include "ui/base/l10n/l10n_util.h" |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/message_center/message_center_util.h" |
| @@ -2655,4 +2656,20 @@ bool ChromeContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle( |
| #endif |
| } |
| +bool ChromeContentBrowserClient::IsPluginAllowedToUseDevChannelAPIs() { |
| +#if defined(ENABLE_PLUGINS) |
| + // Allow access for tests. |
| + if (CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnablePepperTesting)) { |
| + return true; |
| + } |
| + |
| + chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| + return channel >= chrome::VersionInfo::CHANNEL_DEV; |
|
bbudge
2013/12/11 18:32:18
I think the direction of the inequality should be
|
| +#else |
| + return false; |
| +#endif |
| +} |
| + |
| + |
| } // namespace chrome |