Protect WebURLLoaderImpl::Context while receiving responses.
[chromium-blink-merge.git] / base / process_util.cc
blob9b89c8f8e6db3d3d56f162789f9afcba119401dc
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
3 // found in the LICENSE file.
5 #include "base/process_util.h"
7 namespace base {
9 bool KillProcesses(const FilePath::StringType& executable_name, int exit_code,
10 const ProcessFilter* filter) {
11 bool result = true;
12 NamedProcessIterator iter(executable_name, filter);
13 while (const ProcessEntry* entry = iter.NextProcessEntry()) {
14 #if defined(OS_WIN)
15 result &= KillProcessById(entry->pid(), exit_code, true);
16 #else
17 result &= KillProcess(entry->pid(), exit_code, true);
18 #endif
20 return result;
23 } // namespace base