| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome/browser/renderer_host/render_process_host.h" | 5 #include "chrome/browser/renderer_host/render_process_host.h" |
| 6 | 6 |
| 7 #include "base/rand_util.h" | 7 #include "base/rand_util.h" |
| 8 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
| 9 #include "chrome/browser/child_process_security_policy.h" | 9 #include "chrome/browser/child_process_security_policy.h" |
| 10 #include "chrome/common/chrome_constants.h" | 10 #include "chrome/common/chrome_constants.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 } // namespace | 79 } // namespace |
| 80 | 80 |
| 81 bool RenderProcessHost::run_renderer_in_process_ = false; | 81 bool RenderProcessHost::run_renderer_in_process_ = false; |
| 82 | 82 |
| 83 RenderProcessHost::RenderProcessHost(Profile* profile) | 83 RenderProcessHost::RenderProcessHost(Profile* profile) |
| 84 : max_page_id_(-1), | 84 : max_page_id_(-1), |
| 85 pid_(-1), | 85 pid_(-1), |
| 86 profile_(profile), | 86 profile_(profile), |
| 87 sudden_termination_allowed_(true) { | 87 sudden_termination_allowed_(true) { |
| 88 all_hosts.set_check_on_null_data(true); |
| 88 } | 89 } |
| 89 | 90 |
| 90 RenderProcessHost::~RenderProcessHost() { | 91 RenderProcessHost::~RenderProcessHost() { |
| 91 } | 92 } |
| 92 | 93 |
| 93 void RenderProcessHost::Attach(IPC::Channel::Listener* listener, | 94 void RenderProcessHost::Attach(IPC::Channel::Listener* listener, |
| 94 int routing_id) { | 95 int routing_id) { |
| 95 listeners_.AddWithID(listener, routing_id); | 96 listeners_.AddWithID(listener, routing_id); |
| 96 } | 97 } |
| 97 | 98 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 187 } |
| 187 | 188 |
| 188 pid_ = pid; | 189 pid_ = pid; |
| 189 all_hosts.AddWithID(this, pid); | 190 all_hosts.AddWithID(this, pid); |
| 190 } | 191 } |
| 191 | 192 |
| 192 void RenderProcessHost::RemoveFromList() { | 193 void RenderProcessHost::RemoveFromList() { |
| 193 if (all_hosts.Lookup(pid_)) | 194 if (all_hosts.Lookup(pid_)) |
| 194 all_hosts.Remove(pid_); | 195 all_hosts.Remove(pid_); |
| 195 } | 196 } |
| OLD | NEW |