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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 18799006: Extension Error Piping - Blink: Chrome Side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 months 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
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
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698