Change base::WriteFileDescriptor() to take a span or StringPiece.
Use a single parameter for the data, instead of separate data/size
parameters. Fix some nits and lint errors along the way.
Bug: 418837
Change-Id: I5c791d84c3cdb712c7aa4ce098caeab424e9c343
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2895444
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#882924}
diff --git a/chromeos/process_proxy/process_output_watcher_unittest.cc b/chromeos/process_proxy/process_output_watcher_unittest.cc
index a5ad705..c27b41d 100644
--- a/chromeos/process_proxy/process_output_watcher_unittest.cc
+++ b/chromeos/process_proxy/process_output_watcher_unittest.cc
@@ -175,8 +175,8 @@
ssize_t test_size = test_str.length() * sizeof(*test_str.c_str());
if (test_cases[i].should_send_terminating_null)
test_size += sizeof(*test_str.c_str());
- EXPECT_TRUE(base::WriteFileDescriptor(pt_pipe[1], test_str.c_str(),
- test_size));
+ EXPECT_TRUE(base::WriteFileDescriptor(
+ pt_pipe[1], base::StringPiece(test_str.c_str(), test_size)));
run_loop.Run();
EXPECT_TRUE(expectations_.IsDone());