summaryrefslogtreecommitdiffstats
path: root/chrome/common/child_process_host.cc
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-05-31 20:30:28 +0100
committerKristian Monsen <kristianm@google.com>2011-06-14 20:31:41 -0700
commit72a454cd3513ac24fbdd0e0cb9ad70b86a99b801 (patch)
tree382278a54ce7a744d62fa510a9a80688cc12434b /chrome/common/child_process_host.cc
parentc4becdd46e31d261b930e4b5a539cbc1d45c23a6 (diff)
downloadexternal_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.zip
external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.tar.gz
external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.tar.bz2
Merge Chromium.org at r11.0.672.0: Initial merge by git.
Change-Id: I8b4aaf611a2a405fe3fe10e8a94ea7658645c192
Diffstat (limited to 'chrome/common/child_process_host.cc')
-rw-r--r--chrome/common/child_process_host.cc22
1 files changed, 21 insertions, 1 deletions
diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc
index e03b3a6..1b6459a 100644
--- a/chrome/common/child_process_host.cc
+++ b/chrome/common/child_process_host.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/metrics/histogram.h"
#include "base/path_service.h"
+#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
#include "chrome/common/child_process_info.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h"
@@ -56,7 +57,10 @@ FilePath ChildProcessHost::GetChildPath(bool allow_self) {
#if defined(OS_LINUX)
// Use /proc/self/exe rather than our known binary path so updates
// can't swap out the binary from underneath us.
- if (allow_self)
+ // When running under Valgrind, forking /proc/self/exe ends up forking the
+ // Valgrind executable, which then crashes. However, it's almost safe to
+ // assume that the updates won't happen while testing with Valgrind tools.
+ if (allow_self && !RunningOnValgrind())
return FilePath("/proc/self/exe");
#endif
@@ -139,6 +143,16 @@ void ChildProcessHost::InstanceCreated() {
Notify(NotificationType::CHILD_INSTANCE_CREATED);
}
+bool ChildProcessHost::OnMessageReceived(const IPC::Message& msg) {
+ return false;
+}
+
+void ChildProcessHost::OnChannelConnected(int32 peer_pid) {
+}
+
+void ChildProcessHost::OnChannelError() {
+}
+
bool ChildProcessHost::Send(IPC::Message* message) {
if (!channel_.get()) {
delete message;
@@ -151,6 +165,12 @@ void ChildProcessHost::OnChildDied() {
delete this;
}
+void ChildProcessHost::ShutdownStarted() {
+}
+
+void ChildProcessHost::Notify(NotificationType type) {
+}
+
ChildProcessHost::ListenerHook::ListenerHook(ChildProcessHost* host)
: host_(host) {
}