Skip to content

Commit

Permalink
Change std::find_if*() to use base:: functions: google_apis/
Browse files Browse the repository at this point in the history
Goal: Slightly simpler and/or more semantically-accurate code.

Bug: none
Change-Id: I90f345c5a6932c7dd7ac7c82373f465dd9baca66
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3911760
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Boris Sazonov <bsazonov@chromium.org>
Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1051204}
  • Loading branch information
pkasting authored and Chromium LUCI CQ committed Sep 26, 2022
1 parent a0ca956 commit b5f2a3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions google_apis/gaia/fake_gaia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
Expand Down Expand Up @@ -387,8 +388,8 @@ void FakeGaia::Initialize() {

FakeGaia::RequestHandlerMap::iterator FakeGaia::FindHandlerByPathPrefix(
const std::string& request_path) {
return std::find_if(
request_handlers_.begin(), request_handlers_.end(),
return base::ranges::find_if(
request_handlers_,
[request_path](std::pair<std::string, HttpRequestHandlerCallback> entry) {
return base::StartsWith(request_path, entry.first,
base::CompareCase::SENSITIVE);
Expand Down

0 comments on commit b5f2a3e

Please sign in to comment.