Rename {absl => std}::optional in //chrome/
#cleanup
Automated patch, intended to be effectively a no-op.
Context:
https://groups.google.com/a/chromium.org/g/cxx/c/nBD_1LaanTc/m/ghh-ZZhWAwAJ?utm_medium=email
As of https://crrev.com/1204351, absl::optional is now a type alias for
std::optional. We should migrate toward it.
Script:
```
function replace {
echo "Replacing $1 by $2"
git grep -l "$1" \
| cut -f1 -d: \
| grep \
-e "^chrome/" \
| sort \
| uniq \
| grep \
-e "\.h" \
-e "\.cc" \
-e "\.mm" \
-e "\.py" \
| xargs sed -i "s/$1/$2/g"
}
replace "absl::make_optional" "std::make_optional"
replace "absl::optional" "std::optional"
replace "absl::nullopt" "std::nullopt"
replace "absl::in_place" "std::in_place"
replace "absl::in_place_t" "std::in_place_t"
replace "\"third_party\/abseil-cpp\/absl\/types\/optional.h\"" "<optional>"
echo "IncludeBlocks: Regroup" >> ".clang-format"
echo "IncludeIsMainRegex: \"(_(android|apple|chromeos|freebsd|fuchsia|fuzzer|ios|linux|mac|nacl|openbsd|posix|stubs?|win))?(_(unit|browser|perf)?tests?)?$\"" >> ".clang-format"
git cl format
git restore ".clang-format"
git cl format
```
Bug: chromium:1500249
Change-Id: I5f8d179940c7af6a927efbf7e70b972a845a4127
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5192010
Reviewed-by: Anastasiia N <[email protected]>
Commit-Queue: Arthur Sonzogni <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Auto-Submit: Arthur Sonzogni <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1247101}
diff --git a/chrome/browser/safe_browsing/chrome_user_population_helper.h b/chrome/browser/safe_browsing/chrome_user_population_helper.h
index 6f950f0..f9c2059d 100644
--- a/chrome/browser/safe_browsing/chrome_user_population_helper.h
+++ b/chrome/browser/safe_browsing/chrome_user_population_helper.h
@@ -5,9 +5,10 @@
#ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_USER_POPULATION_HELPER_H_
#define CHROME_BROWSER_SAFE_BROWSING_CHROME_USER_POPULATION_HELPER_H_
+#include <optional>
+
#include "chrome/browser/profiles/profile.h"
#include "components/safe_browsing/core/common/proto/csd.pb.h"
-#include "third_party/abseil-cpp/absl/types/optional.h"
namespace safe_browsing {