OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "content/browser/child_process_launcher.h" | 5 #include "content/browser/child_process_launcher.h" |
6 | 6 |
7 #include <utility> // For std::pair. | 7 #include <utility> // For std::pair. |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // parent class destructs, while still holding on to state that we need. | 52 // parent class destructs, while still holding on to state that we need. |
53 class ChildProcessLauncher::Context | 53 class ChildProcessLauncher::Context |
54 : public base::RefCountedThreadSafe<ChildProcessLauncher::Context> { | 54 : public base::RefCountedThreadSafe<ChildProcessLauncher::Context> { |
55 public: | 55 public: |
56 Context() | 56 Context() |
57 : client_(NULL), | 57 : client_(NULL), |
58 client_thread_id_(BrowserThread::UI), | 58 client_thread_id_(BrowserThread::UI), |
59 termination_status_(base::TERMINATION_STATUS_NORMAL_TERMINATION), | 59 termination_status_(base::TERMINATION_STATUS_NORMAL_TERMINATION), |
60 exit_code_(RESULT_CODE_NORMAL_EXIT), | 60 exit_code_(RESULT_CODE_NORMAL_EXIT), |
61 starting_(true), | 61 starting_(true), |
| 62 // TODO(earthdok): Re-enable on CrOS http://crbug.com/360622 |
| 63 #if (defined(ADDRESS_SANITIZER) || defined(LEAK_SANITIZER) || \ |
| 64 defined(THREAD_SANITIZER)) && !defined(OS_CHROMEOS) |
| 65 terminate_child_on_shutdown_(false) |
| 66 #else |
62 terminate_child_on_shutdown_(true) | 67 terminate_child_on_shutdown_(true) |
| 68 #endif |
63 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 69 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
64 , zygote_(false) | 70 , zygote_(false) |
65 #endif | 71 #endif |
66 { | 72 { |
67 } | 73 } |
68 | 74 |
69 void Launch( | 75 void Launch( |
70 SandboxedProcessLauncherDelegate* delegate, | 76 SandboxedProcessLauncherDelegate* delegate, |
71 CommandLine* cmd_line, | 77 CommandLine* cmd_line, |
72 int child_process_id, | 78 int child_process_id, |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 GetHandle(), background)); | 499 GetHandle(), background)); |
494 } | 500 } |
495 | 501 |
496 void ChildProcessLauncher::SetTerminateChildOnShutdown( | 502 void ChildProcessLauncher::SetTerminateChildOnShutdown( |
497 bool terminate_on_shutdown) { | 503 bool terminate_on_shutdown) { |
498 if (context_.get()) | 504 if (context_.get()) |
499 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); | 505 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); |
500 } | 506 } |
501 | 507 |
502 } // namespace content | 508 } // namespace content |
OLD | NEW |