Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3742)

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 104673003: Pepper: Send dev/canary channel status to plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OVERRIDE build fix Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | components/nacl/browser/nacl_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | components/nacl/browser/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698