OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/common/child_process.h" | 5 #include "chrome/common/child_process.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/message_loop.h" |
8 #include "base/string_util.h" | |
9 #include "chrome/common/child_thread.h" | 8 #include "chrome/common/child_thread.h" |
10 | 9 |
11 ChildProcess* ChildProcess::child_process_; | 10 ChildProcess* ChildProcess::child_process_; |
12 | 11 |
13 ChildProcess::ChildProcess(ChildThread* child_thread) | 12 ChildProcess::ChildProcess(ChildThread* child_thread) |
14 : child_thread_(child_thread), | 13 : child_thread_(child_thread), |
15 ref_count_(0), | 14 ref_count_(0), |
16 shutdown_event_(true, false) { | 15 shutdown_event_(true, false) { |
17 DCHECK(!child_process_); | 16 DCHECK(!child_process_); |
18 child_process_ = this; | 17 child_process_ = this; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 return; | 49 return; |
51 | 50 |
52 if (child_thread_.get()) // null in unittests. | 51 if (child_thread_.get()) // null in unittests. |
53 child_thread_->OnProcessFinalRelease(); | 52 child_thread_->OnProcessFinalRelease(); |
54 } | 53 } |
55 | 54 |
56 base::WaitableEvent* ChildProcess::GetShutDownEvent() { | 55 base::WaitableEvent* ChildProcess::GetShutDownEvent() { |
57 DCHECK(child_process_); | 56 DCHECK(child_process_); |
58 return &child_process_->shutdown_event_; | 57 return &child_process_->shutdown_event_; |
59 } | 58 } |
OLD | NEW |