0
Files
src/codelabs
Arthur Sonzogni 5bc3326c91 Cleanup: Format <optional> include order.
This is an automated patch. Please avoid assigning unrelated bug.
 #cleanup

This is a follow-up to @thestig comment:
https://chromium-review.googlesource.com/c/chromium/src/+/5009410/7/pdf/accessibility_helper.cc#11

Several developers, including myself rewrote optional without properly
reordering the #includes at the beginning.
This patches automatically fixes it.

Script:
-------

```
function replace {
  echo "Replacing $1 by $2"
  git grep -l "$1" \
    | cut -f1 -d: \
    | grep -v \
      -e "*win*" \
      -e "third_party/*" \
      -e "tools/*" \
    | grep \
      -e "\.h" \
      -e "\.cc" \
    | sort \
    | uniq \
    | xargs sed -i "s/$1/$2/g"
}

replace "#include <optional>" ""
git add -u
git commit -m "remove optional"
git revert HEAD --no-commit
git add -u
echo "Formatting":
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 add -u
git cl format --upstream=HEAD
git checkout origin/main -- ".clang-format"
git add -u
git commit -m "revert with format"
git reset --soft origin/main
git add -u
git commit -m "Automated format"
```

cleanup: This is a no-op patch formatting includes.
Bug: 40288126
Change-Id: I5f61b1207c097a4c6b20a034f9d1b323975b1851
AX-Relnotes: n/a.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5335142
Owners-Override: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1267143}
2024-02-29 19:39:05 +00:00
..

Chromium Codelab

See the cpp101/ directory for the Chromium C++ codelab, including example solutions.

See the threading_and_scheduling/ directory for more elaborate usages of the threading and scheduling primitives in Chromium.

Motivation

The goal of this codelab is to introduce new Chromium developers to both the important design patterns and the style of code they can expect to become familiar with.

The code in this directory is for documentation purposes only. It is compiled via the top level BUILD.gn's gn_all target to make sure it is kept up to date.