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

Unified Diff: chrome/browser/extensions/tab_helper.cc

Issue 321453003: Mark ChromeViewHostMsg_DetailedConsoleMessageAdded as extensions-only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 6 years, 6 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
« no previous file with comments | « chrome/browser/extensions/chrome_extension_web_contents_observer.cc ('k') | chrome/chrome_renderer.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/tab_helper.cc
diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc
index 8660a32f726d9887ecc469439707deee16ac272b..bc51f17378051425d25055f3f041185f4fbee937 100644
--- a/chrome/browser/extensions/tab_helper.cc
+++ b/chrome/browser/extensions/tab_helper.cc
@@ -318,12 +318,16 @@ bool TabHelper::OnMessageReceived(const IPC::Message& message) {
bool TabHelper::OnMessageReceived(const IPC::Message& message,
content::RenderFrameHost* render_frame_host) {
+#if defined(ENABLE_EXTENSIONS)
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(TabHelper, message)
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DetailedConsoleMessageAdded,
OnDetailedConsoleMessageAdded)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
+#else
+ bool handled = false;
+#endif
return handled;
}
@@ -472,6 +476,7 @@ void TabHelper::OnDetailedConsoleMessageAdded(
const base::string16& source,
const StackTrace& stack_trace,
int32 severity_level) {
+#if defined(ENABLE_EXTENSIONS)
if (IsSourceFromAnExtension(source)) {
content::RenderViewHost* rvh = web_contents()->GetRenderViewHost();
ErrorConsole::Get(profile_)->ReportError(
@@ -487,6 +492,7 @@ void TabHelper::OnDetailedConsoleMessageAdded(
rvh->GetRoutingID(),
rvh->GetProcess()->GetID())));
}
+#endif
}
const Extension* TabHelper::GetExtension(const std::string& extension_app_id) {
« no previous file with comments | « chrome/browser/extensions/chrome_extension_web_contents_observer.cc ('k') | chrome/chrome_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698