#include "chrome/renderer/extensions/dispatcher.h"
#include "extensions/common/extensions_client.h"
#include "extensions/common/manifest_constants.h"
+#include "extensions/common/switches.h"
namespace extensions {
return true;
}
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSigninProcess)) {
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(::switches::kSigninProcess)) {
if (error)
*error = errors::kCannotScriptSigninPage;
return false;
}
- if (dispatcher_->IsExtensionActive(extension_misc::kWebStoreAppId)) {
+ if (dispatcher_->IsExtensionActive(extension_misc::kWebStoreAppId) &&
+ !command_line->HasSwitch(switches::kAllowScriptingGallery)) {
if (error)
*error = errors::kCannotScriptGallery;
return false;