| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2006-2008 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. | |
| 4 | |
| 5 #ifndef CHROME_COMMON_CHROME_PROCESS_FILTER_H__ | |
| 6 #define CHROME_COMMON_CHROME_PROCESS_FILTER_H__ | |
| 7 | |
| 8 #include "base/process_util.h" | |
| 9 | |
| 10 // Filter all chrome browser processes that run with the same user data | |
| 11 // directory. | |
| 12 class BrowserProcessFilter : public base::ProcessFilter { | |
| 13 public: | |
| 14 // Create the filter for the given user_data_dir. | |
| 15 // If user_data_dir is an empty string, will use the PathService | |
| 16 // user_data_dir (e.g. chrome::DIR_USER_DATA). | |
| 17 explicit BrowserProcessFilter(const std::wstring user_data_dir); | |
| 18 | |
| 19 uint32 browser_process_id() const { return browser_process_id_; } | |
| 20 | |
| 21 virtual bool Includes(base::ProcessId pid, base::ProcessId parent_pid) const; | |
| 22 | |
| 23 private: | |
| 24 std::wstring user_data_dir_; | |
| 25 DWORD browser_process_id_; | |
| 26 | |
| 27 DISALLOW_EVIL_CONSTRUCTORS(BrowserProcessFilter); | |
| 28 }; | |
| 29 | |
| 30 #endif // CHROME_COMMON_CHROME_PROCESS_FILTER_H__ | |
| OLD | NEW |