| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_frame/test_utils.h" | 5 #include "chrome_frame/test_utils.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlwin.h> | 8 #include <atlwin.h> |
| 9 #include <winternl.h> | 9 #include <winternl.h> |
| 10 | 10 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 290 |
| 291 } // namespace | 291 } // namespace |
| 292 | 292 |
| 293 bool KillAllNamedProcessesWithArgument(const std::wstring& process_name, | 293 bool KillAllNamedProcessesWithArgument(const std::wstring& process_name, |
| 294 const std::wstring& argument) { | 294 const std::wstring& argument) { |
| 295 bool result = true; | 295 bool result = true; |
| 296 ArgumentFilter filter(argument); | 296 ArgumentFilter filter(argument); |
| 297 base::NamedProcessIterator iter(process_name, &filter); | 297 base::NamedProcessIterator iter(process_name, &filter); |
| 298 while (const base::ProcessEntry* entry = iter.NextProcessEntry()) { | 298 while (const base::ProcessEntry* entry = iter.NextProcessEntry()) { |
| 299 if (!base::KillProcessById(entry->pid(), 0, true)) { | 299 if (!base::KillProcessById(entry->pid(), 0, true)) { |
| 300 DLOG(ERROR) << "Failed to kill process " << (*entry).th32ProcessID; | |
| 301 result = false; | 300 result = false; |
| 302 } | 301 } |
| 303 } | 302 } |
| 304 | 303 |
| 305 return result; | 304 return result; |
| 306 } | 305 } |
| OLD | NEW |