Skip to content

Commit

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

Bug: 1368812
Change-Id: I955ccd2e4cfc1e20466101ff7953eaa60c748f4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3927913
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1052945}
  • Loading branch information
pkasting authored and Chromium LUCI CQ committed Sep 29, 2022
1 parent d1b617d commit d31726c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions google_apis/gaia/oauth2_id_token_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <memory>

#include "base/base64url.h"
#include "base/containers/contains.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/strings/string_split.h"
Expand Down Expand Up @@ -95,11 +96,9 @@ TokenServiceFlags ParseServiceFlags(const std::string& id_token) {
}

token_service_flags.is_child_account =
std::find(service_flags.begin(), service_flags.end(),
kChildAccountServiceFlag) != service_flags.end();
base::Contains(service_flags, kChildAccountServiceFlag);
token_service_flags.is_under_advanced_protection =
std::find(service_flags.begin(), service_flags.end(),
kAdvancedProtectionAccountServiceFlag) != service_flags.end();
base::Contains(service_flags, kAdvancedProtectionAccountServiceFlag);
return token_service_flags;
}

Expand Down

0 comments on commit d31726c

Please sign in to comment.