Remove GenericScopedHandle::IsValid in favor of is_valid
This CL is the first of two CLs to remove GenericScopedHandle::IsValid
in favor of the existing is_valid method. Specifically, the following
code:
// TODO(crbug.com/40212898): Migrate callers to is_valid().
bool IsValid() const { return is_valid(); }
This first CL fixes up all of the callers. The second CL will remove
IsValid.
Bug: 40212898
Change-Id: Ie45f8f1ba10ea85cb794a5da04079dfa2af9f833
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7131867
Owners-Override: Lei Zhang <[email protected]>
Commit-Queue: Lei Zhang <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1542612}
diff --git a/chrome/browser/memory_details_win.cc b/chrome/browser/memory_details_win.cc
index faa25dfe..bb1341a 100644
--- a/chrome/browser/memory_details_win.cc
+++ b/chrome/browser/memory_details_win.cc
@@ -67,8 +67,9 @@
base::ProcessId pid = process_entry.th32ProcessID;
base::win::ScopedHandle process_handle(::OpenProcess(
PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid));
- if (!process_handle.IsValid())
+ if (!process_handle.is_valid()) {
continue;
+ }
if (_wcsicmp(base::as_wcstr(process_data_[0].process_name),
process_entry.szExeFile) != 0) {
continue;