Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1333)

Unified Diff: chrome/app/chrome_watcher_command_line_unittest_win.cc

Issue 868543002: Move OpenProcessHandle to Process::Open. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process/process_win.cc ('k') | chrome/browser/chromeos/policy/device_status_collector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_watcher_command_line_unittest_win.cc
diff --git a/chrome/app/chrome_watcher_command_line_unittest_win.cc b/chrome/app/chrome_watcher_command_line_unittest_win.cc
index 771094f0c658d34cd2388e718a105414fafad0d1..6aac76e80a8f09285873c9680feb2fbcfaa7dd09 100644
--- a/chrome/app/chrome_watcher_command_line_unittest_win.cc
+++ b/chrome/app/chrome_watcher_command_line_unittest_win.cc
@@ -8,24 +8,22 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
-#include "base/process/process_handle.h"
+#include "base/process/process.h"
#include "base/win/scoped_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(ChromeWatcherCommandLineTest, BasicTest) {
- // Ownership of these handles is passed to the ScopedHandles below via
- // InterpretChromeWatcherCommandLine().
- base::ProcessHandle current = nullptr;
- ASSERT_TRUE(base::OpenProcessHandle(base::GetCurrentProcId(), &current));
+ base::Process current = base::Process::Open(base::GetCurrentProcId());
+ ASSERT_TRUE(current.IsValid());
HANDLE event = ::CreateEvent(nullptr, FALSE, FALSE, nullptr);
base::CommandLine cmd_line = GenerateChromeWatcherCommandLine(
- base::FilePath(L"example.exe"), current, event);
+ base::FilePath(L"example.exe"), current.Handle(), event);
base::win::ScopedHandle current_result;
base::win::ScopedHandle event_result;
ASSERT_TRUE(InterpretChromeWatcherCommandLine(cmd_line, &current_result,
&event_result));
- ASSERT_EQ(current, current_result.Get());
+ ASSERT_EQ(current.Handle(), current_result.Get());
ASSERT_EQ(event, event_result.Get());
}
« no previous file with comments | « base/process/process_win.cc ('k') | chrome/browser/chromeos/policy/device_status_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698