Migrate base::{size,empty,data} to STL equivalents in //base.
This is not a complete migration; this only migrates fully-qualified
references to these functions, with the minimal set of build fixes
needed to make things compile.
Bug: 1299695
Change-Id: Ib7359b018dae054adcc87e435aee0f186c74fd50
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3492822
Reviewed-by: Lei Zhang <[email protected]>
Commit-Queue: Lei Zhang <[email protected]>
Owners-Override: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#975977}
diff --git a/base/sync_socket_win.cc b/base/sync_socket_win.cc
index b5dd2424..b35f8f3 100644
--- a/base/sync_socket_win.cc
+++ b/base/sync_socket_win.cc
@@ -7,7 +7,6 @@
#include <limits.h>
#include <stddef.h>
-#include "base/cxx17_backports.h"
#include "base/logging.h"
#include "base/rand_util.h"
#include "base/threading/scoped_blocking_call.h"
@@ -22,7 +21,7 @@
// in sandboxed scenarios as we might have by-name policies that allow pipe
// creation. Also keep the secure random number generation.
const wchar_t kPipeNameFormat[] = L"\\\\.\\pipe\\chrome.sync.%u.%u.%lu";
-const size_t kPipePathMax = base::size(kPipeNameFormat) + (3 * 10) + 1;
+const size_t kPipePathMax = std::size(kPipeNameFormat) + (3 * 10) + 1;
// To avoid users sending negative message lengths to Send/Receive
// we clamp message lengths, which are size_t, to no more than INT_MAX.
@@ -154,7 +153,7 @@
if (::GetLastError() == ERROR_IO_PENDING) {
HANDLE events[] = { io_event->handle(), cancel_event->handle() };
const int wait_result = WaitForMultipleObjects(
- base::size(events), events, FALSE,
+ std::size(events), events, FALSE,
timeout_in_ms == INFINITE
? timeout_in_ms
: static_cast<DWORD>(