summaryrefslogtreecommitdiff
path: root/common/http_common.cc
diff options
context:
space:
mode:
authorhscham <hscham@chromium.org>2020-02-20 12:32:06 +0900
committerCommit Bot <commit-bot@chromium.org>2020-04-04 11:51:34 +0000
commit00b6aa24548cffae6e979e99722ea2bda95be8fe (patch)
treeed01d7c7f66d8bdea4ea7ca2e9ca6d16484f52c4 /common/http_common.cc
parentc48581a0b26c77f900aa7b82bd13f4c6691d474f (diff)
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>
Diffstat (limited to 'common/http_common.cc')
-rw-r--r--common/http_common.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/http_common.cc b/common/http_common.cc
index 5f234b0b..c8bac477 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 @@ const char* GetHttpResponseDescription(HttpResponseCode code) {
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 @@ const char* GetHttpContentTypeString(HttpContentType type) {
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;