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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 client_thread_id_(BrowserThread::UI), | 51 client_thread_id_(BrowserThread::UI), |
52 termination_status_(base::TERMINATION_STATUS_NORMAL_TERMINATION), | 52 termination_status_(base::TERMINATION_STATUS_NORMAL_TERMINATION), |
53 exit_code_(content::RESULT_CODE_NORMAL_EXIT), | 53 exit_code_(content::RESULT_CODE_NORMAL_EXIT), |
54 starting_(true) | 54 starting_(true) |
55 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 55 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
56 , zygote_(false) | 56 , zygote_(false) |
57 #endif | 57 #endif |
58 { | 58 { |
59 #if defined(OS_POSIX) | 59 #if defined(OS_POSIX) |
60 terminate_child_on_shutdown_ = !CommandLine::ForCurrentProcess()-> | 60 terminate_child_on_shutdown_ = !CommandLine::ForCurrentProcess()-> |
61 HasSwitch(switches::kRendererCleanExit); | 61 HasSwitch(switches::kChildCleanExit); |
62 #else | 62 #else |
63 terminate_child_on_shutdown_ = true; | 63 terminate_child_on_shutdown_ = true; |
64 #endif | 64 #endif |
65 } | 65 } |
66 | 66 |
67 void Launch( | 67 void Launch( |
68 #if defined(OS_WIN) | 68 #if defined(OS_WIN) |
69 const FilePath& exposed_dir, | 69 const FilePath& exposed_dir, |
70 #elif defined(OS_ANDROID) | 70 #elif defined(OS_ANDROID) |
71 int ipcfd, | 71 int ipcfd, |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 base::Bind( | 445 base::Bind( |
446 &ChildProcessLauncher::Context::SetProcessBackgrounded, | 446 &ChildProcessLauncher::Context::SetProcessBackgrounded, |
447 GetHandle(), background)); | 447 GetHandle(), background)); |
448 } | 448 } |
449 | 449 |
450 void ChildProcessLauncher::SetTerminateChildOnShutdown( | 450 void ChildProcessLauncher::SetTerminateChildOnShutdown( |
451 bool terminate_on_shutdown) { | 451 bool terminate_on_shutdown) { |
452 if (context_) | 452 if (context_) |
453 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); | 453 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); |
454 } | 454 } |
OLD | NEW |