OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/browser_child_process_host.h" | 5 #include "content/browser/browser_child_process_host.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 Notify(content::NOTIFICATION_CHILD_PROCESS_WAS_KILLED); | 146 Notify(content::NOTIFICATION_CHILD_PROCESS_WAS_KILLED); |
147 UMA_HISTOGRAM_COUNTS("ChildProcess.Kills", this->type()); | 147 UMA_HISTOGRAM_COUNTS("ChildProcess.Kills", this->type()); |
148 break; | 148 break; |
149 } | 149 } |
150 default: | 150 default: |
151 break; | 151 break; |
152 } | 152 } |
153 // Notify in the main loop of the disconnection. | 153 // Notify in the main loop of the disconnection. |
154 Notify(content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED); | 154 Notify(content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED); |
155 } | 155 } |
| 156 #if defined (OS_WIN) |
| 157 ChildProcessHost::ReleaseCachedFont( |
| 158 base::GetProcId(child_process_->GetHandle())); |
| 159 #endif |
156 ChildProcessHost::OnChildDied(); | 160 ChildProcessHost::OnChildDied(); |
157 } | 161 } |
158 | 162 |
159 void BrowserChildProcessHost::ShutdownStarted() { | 163 void BrowserChildProcessHost::ShutdownStarted() { |
160 // Must remove the process from the list now, in case it gets used for a | 164 // Must remove the process from the list now, in case it gets used for a |
161 // new instance before our watcher tells us that the process terminated. | 165 // new instance before our watcher tells us that the process terminated. |
162 g_child_process_list.Get().remove(this); | 166 g_child_process_list.Get().remove(this); |
163 } | 167 } |
164 | 168 |
165 BrowserChildProcessHost::ClientHook::ClientHook(BrowserChildProcessHost* host) | 169 BrowserChildProcessHost::ClientHook::ClientHook(BrowserChildProcessHost* host) |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 206 |
203 return *iterator_; | 207 return *iterator_; |
204 } while (true); | 208 } while (true); |
205 | 209 |
206 return NULL; | 210 return NULL; |
207 } | 211 } |
208 | 212 |
209 bool BrowserChildProcessHost::Iterator::Done() { | 213 bool BrowserChildProcessHost::Iterator::Done() { |
210 return iterator_ == g_child_process_list.Get().end(); | 214 return iterator_ == g_child_process_list.Get().end(); |
211 } | 215 } |
OLD | NEW |