Index: chrome/renderer/chrome_content_renderer_client.cc |
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc |
index 7a68264fbab94d920725f2fd78e9ea5e7832adb4..eaf18fd737ea41dbb4a39706e5f170ee1baff90c 100644 |
--- a/chrome/renderer/chrome_content_renderer_client.cc |
+++ b/chrome/renderer/chrome_content_renderer_client.cc |
@@ -789,12 +789,12 @@ bool ChromeContentRendererClient::IsNaClAllowed( |
(extension->location() == extensions::Manifest::COMPONENT || |
extensions::Manifest::IsUnpackedLocation(extension->location())); |
- bool is_invoked_by_extension = app_url.SchemeIs("chrome-extension"); |
+ bool is_invoked_by_extension = app_url.SchemeIs(extensions::kExtensionScheme); |
// The NaCl PDF viewer is always allowed and can use 'Dev' interfaces. |
bool is_nacl_pdf_viewer = |
(is_extension_from_webstore && |
- manifest_url.SchemeIs("chrome-extension") && |
+ manifest_url.SchemeIs(extensions::kExtensionScheme) && |
manifest_url.host() == "acadkphlmlegjaadjagenfimbpphcgnh"); |
// Allow Chrome Web Store extensions, built-in extensions and extensions |
@@ -1283,5 +1283,14 @@ bool ChromeContentRendererClient::AllowPepperMediaStreamAPI( |
return false; |
} |
+bool ChromeContentRendererClient::ShouldReportDetailedMessage( |
+ const GURL& url) const { |
+ // Currently, we are only interested in anything caused by an extension. |
+ // A source came from an extension if it is either directly from the |
+ // extension's url (chrome-extension://), or if it did not come from a real |
+ // url at all (as in the source being "event_bindings"). |
Matt Perry
2013/07/15 21:35:31
I'm not sure the latter assertion is true (e.g. ma
Devlin
2013/07/16 01:41:28
Done.
|
+ return !url.is_empty() && |
+ (!url.is_valid() || url.SchemeIs(extensions::kExtensionScheme)); |
+} |
} // namespace chrome |