| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 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 | 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 <windows.h> | 5 #include <windows.h> |
| 6 | 6 |
| 7 #include "chrome/common/chrome_process_filter.h" | 7 #include "chrome/common/chrome_process_filter.h" |
| 8 | 8 |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "chrome/common/chrome_constants.h" | 10 #include "chrome/common/chrome_constants.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_); | 21 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_); |
| 22 | 22 |
| 23 | 23 |
| 24 HWND message_window = FindWindowEx(HWND_MESSAGE, NULL, | 24 HWND message_window = FindWindowEx(HWND_MESSAGE, NULL, |
| 25 chrome::kMessageWindowClass, | 25 chrome::kMessageWindowClass, |
| 26 user_data_dir_.c_str()); | 26 user_data_dir_.c_str()); |
| 27 if (message_window) | 27 if (message_window) |
| 28 GetWindowThreadProcessId(message_window, &browser_process_id_); | 28 GetWindowThreadProcessId(message_window, &browser_process_id_); |
| 29 } | 29 } |
| 30 | 30 |
| 31 bool BrowserProcessFilter::Includes(uint32 pid, | 31 bool BrowserProcessFilter::Includes(base::ProcessId pid, |
| 32 uint32 parent_pid) const { | 32 base::ProcessId parent_pid) const { |
| 33 return browser_process_id_ && (browser_process_id_ == pid || | 33 return browser_process_id_ && (browser_process_id_ == pid || |
| 34 browser_process_id_ == parent_pid); | 34 browser_process_id_ == parent_pid); |
| 35 } | 35 } |
| OLD | NEW |