update_engine: changes for libchrome r680000 uprev

Changes applied include:
Replace arraysize by base::size.
Replace base::MessageLoop::current()->task_runner by
base::ThreadTaskRunnerHandle::Get, and
base::MessageLoopForIO::current by base::MessageLoopCurrent::IsSet.
Remove use of base::ContainsKey.
Replace base::Int{,64}ToString by base::NumberTostring.

The changes are all compatible with current libchrome r576279.

BUG=chromium:1054279
TEST=unittest

Change-Id: Ibb6027a5070e0e2d4554a6684350168542fedf5e
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2065691
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Tested-by: Qijiang Fan <fqj@google.com>
Commit-Queue: Qijiang Fan <fqj@google.com>
diff --git a/common/http_fetcher_unittest.cc b/common/http_fetcher_unittest.cc
index 237ea20..589579e 100644
--- a/common/http_fetcher_unittest.cc
+++ b/common/http_fetcher_unittest.cc
@@ -29,6 +29,7 @@
 #include <base/location.h>
 #include <base/logging.h>
 #include <base/message_loop/message_loop.h>
+#include <base/stl_util.h>
 #include <base/strings/string_number_conversions.h>
 #include <base/strings/string_util.h>
 #include <base/strings/stringprintf.h>
@@ -1049,7 +1050,7 @@
   unique_ptr<HttpServer> server(this->test_.CreateServer());
   ASSERT_TRUE(server->started_);
 
-  for (size_t c = 0; c < arraysize(kRedirectCodes); ++c) {
+  for (size_t c = 0; c < base::size(kRedirectCodes); ++c) {
     const string url = base::StringPrintf(
         "/redirect/%d/download/%d", kRedirectCodes[c], kMediumLength);
     RedirectTest(server.get(), true, url, this->test_.NewLargeFetcher());
@@ -1066,7 +1067,7 @@
   string url;
   for (int r = 0; r < kDownloadMaxRedirects; r++) {
     url += base::StringPrintf("/redirect/%d",
-                              kRedirectCodes[r % arraysize(kRedirectCodes)]);
+                              kRedirectCodes[r % base::size(kRedirectCodes)]);
   }
   url += base::StringPrintf("/download/%d", kMediumLength);
   RedirectTest(server.get(), true, url, this->test_.NewLargeFetcher());
@@ -1082,7 +1083,7 @@
   string url;
   for (int r = 0; r < kDownloadMaxRedirects + 1; r++) {
     url += base::StringPrintf("/redirect/%d",
-                              kRedirectCodes[r % arraysize(kRedirectCodes)]);
+                              kRedirectCodes[r % base::size(kRedirectCodes)]);
   }
   url += base::StringPrintf("/download/%d", kMediumLength);
   RedirectTest(server.get(), false, url, this->test_.NewLargeFetcher());