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_common.cc b/common/http_common.cc
index 5f234b0..c8bac47 100644
--- a/common/http_common.cc
+++ b/common/http_common.cc
@@ -21,6 +21,7 @@
#include <cstdlib>
#include <base/macros.h>
+#include <base/stl_util.h>
namespace chromeos_update_engine {
@@ -56,7 +57,7 @@
bool is_found = false;
size_t i;
- for (i = 0; i < arraysize(http_response_table); i++)
+ for (i = 0; i < base::size(http_response_table); i++)
if ((is_found = (http_response_table[i].code == code)))
break;
@@ -77,7 +78,7 @@
bool is_found = false;
size_t i;
- for (i = 0; i < arraysize(http_content_type_table); i++)
+ for (i = 0; i < base::size(http_content_type_table); i++)
if ((is_found = (http_content_type_table[i].type == type)))
break;