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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2847003005: Reland "Add enable_ipc_logging build argument" (Closed)
Patch Set: Reland "Add enable_ipc_logging build argument" Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « content/browser/browser_ipc_logging.cc ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after
2132 void RenderProcessHostImpl::OnChannelConnected(int32_t peer_pid) { 2132 void RenderProcessHostImpl::OnChannelConnected(int32_t peer_pid) {
2133 channel_connected_ = true; 2133 channel_connected_ = true;
2134 if (IsReady()) { 2134 if (IsReady()) {
2135 DCHECK(!sent_render_process_ready_); 2135 DCHECK(!sent_render_process_ready_);
2136 sent_render_process_ready_ = true; 2136 sent_render_process_ready_ = true;
2137 // Send RenderProcessReady only if we already received the process handle. 2137 // Send RenderProcessReady only if we already received the process handle.
2138 for (auto& observer : observers_) 2138 for (auto& observer : observers_)
2139 observer.RenderProcessReady(this); 2139 observer.RenderProcessReady(this);
2140 } 2140 }
2141 2141
2142 #if defined(IPC_MESSAGE_LOG_ENABLED) 2142 #if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED)
2143 Send(new ChildProcessMsg_SetIPCLoggingEnabled( 2143 Send(new ChildProcessMsg_SetIPCLoggingEnabled(
2144 IPC::Logging::GetInstance()->Enabled())); 2144 IPC::Logging::GetInstance()->Enabled()));
2145 #endif 2145 #endif
2146 2146
2147 tracked_objects::ThreadData::Status status = 2147 tracked_objects::ThreadData::Status status =
2148 tracked_objects::ThreadData::status(); 2148 tracked_objects::ThreadData::status();
2149 Send(new ChildProcessMsg_SetProfilerStatus(status)); 2149 Send(new ChildProcessMsg_SetProfilerStatus(status));
2150 2150
2151 // Inform AudioInputRendererHost about the new render process PID. 2151 // Inform AudioInputRendererHost about the new render process PID.
2152 // AudioInputRendererHost is reference counted, so its lifetime is 2152 // AudioInputRendererHost is reference counted, so its lifetime is
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
3119 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3119 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3120 3120
3121 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3121 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3122 // Capture the error message in a crash key value. 3122 // Capture the error message in a crash key value.
3123 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3123 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3124 bad_message::ReceivedBadMessage(render_process_id, 3124 bad_message::ReceivedBadMessage(render_process_id,
3125 bad_message::RPH_MOJO_PROCESS_ERROR); 3125 bad_message::RPH_MOJO_PROCESS_ERROR);
3126 } 3126 }
3127 3127
3128 } // namespace content 3128 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_ipc_logging.cc ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698