use base::size to replace arraysize

arraysize is deprecated and will be removed at next libchrome uprev.

BUG=chromium:1054279
TEST=CQ

Exempt-From-Owner-Approval: Mechanical change involving a lot of owners.
Change-Id: If95cbea8623c7a946e277814be8685e7892438b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2129750
Reviewed-by: Sergey Poromov <poromov@chromium.org>
Reviewed-by: David Burger <dburger@chromium.org>
Reviewed-by: Yusuke Sato <yusukes@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Sergei Datsenko <dats@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Kishan Kunduru <kkunduru@chromium.org>
Commit-Queue: Qijiang Fan <fqj@google.com>
Tested-by: Qijiang Fan <fqj@google.com>
diff --git a/ml/graph_executor_impl.cc b/ml/graph_executor_impl.cc
index 0422621..e95766f 100644
--- a/ml/graph_executor_impl.cc
+++ b/ml/graph_executor_impl.cc
@@ -9,6 +9,8 @@
 #include <utility>
 #include <vector>
 
+#include <base/stl_util.h>
+
 #include "ml/mojom/tensor.mojom.h"
 #include "ml/tensor_view.h"
 
@@ -231,7 +233,7 @@
 
     // Check that the current input node is a supported type.
     const uint32_t cur_input_type = interpreter_->tensor(cur_input_id)->type;
-    if (cur_input_type >= arraysize(kPopulateInputFns)) {
+    if (cur_input_type >= base::size(kPopulateInputFns)) {
       LOG(ERROR) << "TF lite graph contains invalid input node " << cur_input_id
                  << " of type " << cur_input_type << ".";
       callback.Run(ExecuteResult::EXECUTION_ERROR, base::nullopt);
@@ -269,7 +271,7 @@
 
     // Check that the current output node is a supported type.
     const uint32_t cur_output_type = interpreter_->tensor(cur_output_id)->type;
-    if (cur_output_type >= arraysize(kPopulateOutputFns)) {
+    if (cur_output_type >= base::size(kPopulateOutputFns)) {
       LOG(ERROR) << "TF lite graph contains invalid output node "
                  << cur_output_id << " of type " << cur_output_type << ".";
       callback.Run(ExecuteResult::EXECUTION_ERROR, base::nullopt);