Index: chrome/renderer/extensions/renderer_permissions_policy_delegate.cc |
diff --git a/chrome/renderer/extensions/renderer_permissions_policy_delegate.cc b/chrome/renderer/extensions/renderer_permissions_policy_delegate.cc |
index 240da309a09dee582fcc36d48edc01624c0e6677..e7042d33b2228d0bc2cbfa311b1fcd5a6a15469b 100644 |
--- a/chrome/renderer/extensions/renderer_permissions_policy_delegate.cc |
+++ b/chrome/renderer/extensions/renderer_permissions_policy_delegate.cc |
@@ -5,6 +5,7 @@ |
#include "chrome/renderer/extensions/renderer_permissions_policy_delegate.h" |
#include "chrome/common/extensions/extension_constants.h" |
+#include "chrome/renderer/searchbox/search_bouncer.h" |
#include "extensions/common/constants.h" |
#include "extensions/common/extensions_client.h" |
#include "extensions/common/manifest_constants.h" |
@@ -37,6 +38,12 @@ bool RendererPermissionsPolicyDelegate::CanExecuteScriptOnPage( |
return false; |
} |
+ if (SearchBouncer::GetInstance()->IsNewTabPage(document_url)) { |
+ if (error) |
+ *error = errors::kCannotScriptNtp; |
+ return false; |
+ } |
+ |
return true; |
} |