Use base::size rather than arraysize in content/.

This is purely a mechanical change; there is no intended behavior change.

BUG=837308
[email protected]

Change-Id: I5ce196bbb75462a0967a95d1b5fd2e72df2c86f4
Reviewed-on: https://chromium-review.googlesource.com/c/1390894
Reviewed-by: Avi Drissman <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#618881}
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index a1647a127..02225da 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -13,8 +13,8 @@
 #include "base/files/file.h"
 #include "base/files/file_util.h"
 #include "base/json/json_reader.h"
-#include "base/macros.h"
 #include "base/path_service.h"
+#include "base/stl_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "build/build_config.h"
 #include "content/public/browser/client_certificate_delegate.h"
@@ -182,7 +182,7 @@
       url::kDataScheme,
       url::kFileScheme,
   };
-  for (size_t i = 0; i < arraysize(kProtocolList); ++i) {
+  for (size_t i = 0; i < base::size(kProtocolList); ++i) {
     if (url.scheme() == kProtocolList[i])
       return true;
   }
diff --git a/content/shell/browser/shell_download_manager_delegate.cc b/content/shell/browser/shell_download_manager_delegate.cc
index 65731c2..2ca93dab 100644
--- a/content/shell/browser/shell_download_manager_delegate.cc
+++ b/content/shell/browser/shell_download_manager_delegate.cc
@@ -15,7 +15,7 @@
 #include "base/command_line.h"
 #include "base/files/file_util.h"
 #include "base/logging.h"
-#include "base/macros.h"
+#include "base/stl_util.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/task/post_task.h"
@@ -165,7 +165,7 @@
 #if defined(OS_WIN)
   std::wstring file_part = base::FilePath(suggested_path).BaseName().value();
   wchar_t file_name[MAX_PATH];
-  base::wcslcpy(file_name, file_part.c_str(), arraysize(file_name));
+  base::wcslcpy(file_name, file_part.c_str(), base::size(file_name));
   OPENFILENAME save_as;
   ZeroMemory(&save_as, sizeof(save_as));
   save_as.lStructSize = sizeof(OPENFILENAME);
@@ -174,7 +174,7 @@
                           ->GetHost()
                           ->GetAcceleratedWidget();
   save_as.lpstrFile = file_name;
-  save_as.nMaxFile = arraysize(file_name);
+  save_as.nMaxFile = base::size(file_name);
 
   std::wstring directory;
   if (!suggested_path.empty())
diff --git a/content/shell/browser/shell_views.cc b/content/shell/browser/shell_views.cc
index ef4da07..cb407fb8 100644
--- a/content/shell/browser/shell_views.cc
+++ b/content/shell/browser/shell_views.cc
@@ -7,7 +7,7 @@
 #include <stddef.h>
 
 #include "base/command_line.h"
-#include "base/macros.h"
+#include "base/stl_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "build/build_config.h"
 #include "content/public/browser/context_factory.h"
@@ -209,7 +209,7 @@
     static const ui::KeyboardCode keys[] = { ui::VKEY_F5,
                                              ui::VKEY_BROWSER_BACK,
                                              ui::VKEY_BROWSER_FORWARD };
-    for (size_t i = 0; i < arraysize(keys); ++i) {
+    for (size_t i = 0; i < base::size(keys); ++i) {
       GetFocusManager()->RegisterAccelerator(
         ui::Accelerator(keys[i], ui::EF_NONE),
         ui::AcceleratorManager::kNormalPriority,
diff --git a/content/shell/browser/web_test/web_test_push_messaging_service.cc b/content/shell/browser/web_test/web_test_push_messaging_service.cc
index 1c5e704..4d7cb1d 100644
--- a/content/shell/browser/web_test/web_test_push_messaging_service.cc
+++ b/content/shell/browser/web_test/web_test_push_messaging_service.cc
@@ -6,7 +6,7 @@
 
 #include "base/callback.h"
 #include "base/logging.h"
-#include "base/macros.h"
+#include "base/stl_util.h"
 #include "content/common/service_worker/service_worker_types.h"
 #include "content/public/browser/permission_type.h"
 #include "content/public/common/push_messaging_status.mojom.h"
@@ -83,9 +83,9 @@
 
   if (permission_status == blink::mojom::PermissionStatus::GRANTED) {
     std::vector<uint8_t> p256dh(kTestP256Key,
-                                kTestP256Key + arraysize(kTestP256Key));
+                                kTestP256Key + base::size(kTestP256Key));
     std::vector<uint8_t> auth(kAuthentication,
-                              kAuthentication + arraysize(kAuthentication));
+                              kAuthentication + base::size(kAuthentication));
 
     subscribed_service_worker_registration_ = service_worker_registration_id;
     callback.Run("layoutTestRegistrationId", p256dh, auth,
@@ -104,9 +104,9 @@
     const std::string& subscription_id,
     const SubscriptionInfoCallback& callback) {
   std::vector<uint8_t> p256dh(kTestP256Key,
-                              kTestP256Key + arraysize(kTestP256Key));
+                              kTestP256Key + base::size(kTestP256Key));
   std::vector<uint8_t> auth(kAuthentication,
-                            kAuthentication + arraysize(kAuthentication));
+                            kAuthentication + base::size(kAuthentication));
 
   callback.Run(true /* is_valid */, p256dh, auth);
 }