Skip to content

Commit

Permalink
Change std::find() to use base:: functions: storage/
Browse files Browse the repository at this point in the history
Simplifies code slightly.

Bug: 1368812
Change-Id: I1804e39ce917fb6c7b4b7afd4ee833bc0e8786a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3928948
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1054421}
  • Loading branch information
pkasting authored and Chromium LUCI CQ committed Oct 3, 2022
1 parent 21d4fa7 commit fa0d40d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions storage/browser/file_system/sandbox_directory_database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#include <stddef.h>
#include <stdint.h>

#include <algorithm>
#include <memory>
#include <set>

#include "base/containers/contains.h"
#include "base/containers/stack.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_util.h"
Expand Down Expand Up @@ -304,8 +304,7 @@ bool DatabaseCheckHelper::ScanDirectory() {
if (!path_.AppendRelativePath(absolute_file_path, &relative_file_path))
return false;

if (std::find(kExcludes, kExcludes + std::size(kExcludes),
relative_file_path) != kExcludes + std::size(kExcludes))
if (base::Contains(kExcludes, relative_file_path))
continue;

if (find_info.IsDirectory()) {
Expand Down

0 comments on commit fa0d40d

Please sign in to comment.