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..40fd567193bdfb352258b809dc229084149ee4fe 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; |
+#else |
+ return false; |
+#endif |
+} |
+ |
+ |
} // namespace chrome |