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

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: Comment updated 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..432766139bad9c3b678ccd3f76d1aa0e643a65b1 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,15 @@ 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 may have come 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"). The latter condition
+ // may catch a few extra cases, but we are only after heuristic accuracy.
+ return !url.is_empty() &&
pfeldman 2013/07/17 09:08:38 This does not look good. It will make all the //@
Devlin 2013/07/17 22:13:54 Commented in other CL (https://codereview.chromium
+ (!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