Index: content/browser/frame_host/render_frame_host_impl.cc |
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
index e77f1b72d098f955335ff40ff3356e274627d62f..e0390f7105daf13767665503d4b5be99abe48cbb 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -641,13 +641,11 @@ void RenderFrameHostImpl::OnAddMessageToConsole( |
HasWebUIScheme(delegate_->GetMainFrameLastCommittedURL()); |
const int32 resolved_level = is_web_ui ? level : ::logging::LOG_INFO; |
- // LogMessages can be persisted so this shouldn't be logged in incognito mode. |
- // This rule is not applied to WebUI pages, because source code of WebUI is a |
- // part of Chrome source code, and we want to treat messages from WebUI the |
- // same way as we treat log messages from native code. |
- if (::logging::GetMinLogLevel() <= resolved_level && |
- (is_web_ui || |
- !GetSiteInstance()->GetBrowserContext()->IsOffTheRecord())) { |
+ // LogMessages should only be created (as they can be persisted) with WebUI |
Charlie Reis
2015/02/12 01:06:03
nit: Update the comment to say why they shouldn't
|
+ // pages, because source code of WebUI is a part of Chrome source code, and we |
+ // want to treat messages from WebUI the same way as we treat log messages |
+ // from native code. |
+ if (::logging::GetMinLogLevel() <= resolved_level && is_web_ui) { |
logging::LogMessage("CONSOLE", line_no, resolved_level).stream() |
<< "\"" << message << "\", source: " << source_id << " (" << line_no |
<< ")"; |