| 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/utility_process_host.h" | 5 #include "content/browser/utility_process_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 void UtilityProcessHost::Client::OnProcessCrashed(int exit_code) { | 27 void UtilityProcessHost::Client::OnProcessCrashed(int exit_code) { |
| 28 } | 28 } |
| 29 | 29 |
| 30 bool UtilityProcessHost::Client::OnMessageReceived( | 30 bool UtilityProcessHost::Client::OnMessageReceived( |
| 31 const IPC::Message& message) { | 31 const IPC::Message& message) { |
| 32 return false; | 32 return false; |
| 33 } | 33 } |
| 34 | 34 |
| 35 UtilityProcessHost::UtilityProcessHost(Client* client, | 35 UtilityProcessHost::UtilityProcessHost(Client* client, |
| 36 BrowserThread::ID client_thread_id) | 36 BrowserThread::ID client_thread_id) |
| 37 : BrowserChildProcessHost(UTILITY_PROCESS), | 37 : BrowserChildProcessHost(content::PROCESS_TYPE_UTILITY), |
| 38 client_(client), | 38 client_(client), |
| 39 client_thread_id_(client_thread_id), | 39 client_thread_id_(client_thread_id), |
| 40 is_batch_mode_(false), | 40 is_batch_mode_(false), |
| 41 no_sandbox_(false), | 41 no_sandbox_(false), |
| 42 #if defined(OS_LINUX) | 42 #if defined(OS_LINUX) |
| 43 child_flags_(CHILD_ALLOW_SELF), | 43 child_flags_(CHILD_ALLOW_SELF), |
| 44 #else | 44 #else |
| 45 child_flags_(CHILD_NORMAL), | 45 child_flags_(CHILD_NORMAL), |
| 46 #endif | 46 #endif |
| 47 started_(false) { | 47 started_(false) { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 void UtilityProcessHost::OnProcessCrashed(int exit_code) { | 149 void UtilityProcessHost::OnProcessCrashed(int exit_code) { |
| 150 BrowserThread::PostTask( | 150 BrowserThread::PostTask( |
| 151 client_thread_id_, FROM_HERE, | 151 client_thread_id_, FROM_HERE, |
| 152 base::Bind(&Client::OnProcessCrashed, client_.get(), exit_code)); | 152 base::Bind(&Client::OnProcessCrashed, client_.get(), exit_code)); |
| 153 } | 153 } |
| 154 | 154 |
| 155 bool UtilityProcessHost::CanShutdown() { | 155 bool UtilityProcessHost::CanShutdown() { |
| 156 return true; | 156 return true; |
| 157 } | 157 } |
| OLD | NEW |