Commit 7b78cd25 authored by Jan Wilken Dörrie's avatar Jan Wilken Dörrie Committed by Commit Bot

[base] Fix Minor Issue in Blink C++ Style Guide

The move of StrongAlias to the base:: namesapce introduced a minor error
to the Blink C++ Style Guide. This change fixes this.

R=pkasting

Bug: None
Change-Id: I81e28b23d9ad4dc2c90189588afe13720e1226d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2554572
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830157}
parent c3475963
......@@ -236,9 +236,9 @@ class Node {
## Prefer enums or StrongAliases to bare bools for function parameters
Prefer enums to bools for function parameters if callers are likely to be
passing constants, since named constants are easier to read at the call site.
Alternatively, you can use base::base::StrongAlias<Tag, bool>. An exception to
this rule is a setter function, where the name of the function already makes
clear what the boolean is.
Alternatively, you can use `base::StrongAlias<Tag, bool>`. An exception to this
rule is a setter function, where the name of the function already makes clear
what the boolean is.
**Good:**
```c++
......@@ -271,7 +271,7 @@ if (frame_->Loader().ShouldClose(FrameLoader::CloseType::kNotForReload)) {
```c++
class FrameLoader {
public:
using ForReload = base::base::StrongAlias<class ForReloadTag, bool>;
using ForReload = base::StrongAlias<class ForReloadTag, bool>;
bool ShouldClose(ForReload) {
// A StrongAlias<_, bool> can be tested like a bool.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment