Skip to content

Commit

Permalink
Use base::size rather than arraysize in url/ ipcs.
Browse files Browse the repository at this point in the history
This is purely a mechanical change; there is no intended behavior change.

BUG=837308

Change-Id: I85c15d42228d0e1c88f366af263d86dca15ba44e
Reviewed-on: https://chromium-review.googlesource.com/c/1390424
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619682}
  • Loading branch information
Avi Drissman authored and Commit Bot committed Jan 3, 2019
1 parent 68c299a commit d729a52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion url/ipc/url_param_traits_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <string>

#include "base/stl_util.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand All @@ -17,7 +18,7 @@ TEST(IPCMessageTest, Serialize) {
"http://user:pass@host.com:888/foo;bar?baz#nop",
};

for (size_t i = 0; i < arraysize(serialize_cases); i++) {
for (size_t i = 0; i < base::size(serialize_cases); i++) {
GURL input(serialize_cases[i]);
IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
IPC::ParamTraits<GURL>::Write(&msg, input);
Expand Down
4 changes: 2 additions & 2 deletions url/mojom/url_gurl_mojom_traits_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <utility>

#include "base/logging.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/stl_util.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/mojom/url_test.mojom.h"
Expand Down Expand Up @@ -42,7 +42,7 @@ TEST(MojoGURLStructTraitsTest, Basic) {
"http://www.google.com/", "http://user:pass@host.com:888/foo;bar?baz#nop",
};

for (size_t i = 0; i < arraysize(serialize_cases); i++) {
for (size_t i = 0; i < base::size(serialize_cases); i++) {
GURL input(serialize_cases[i]);
GURL output;
EXPECT_TRUE(proxy->BounceUrl(input, &output));
Expand Down

0 comments on commit d729a52

Please sign in to comment.