
https://google.github.io/styleguide/cppguide.html#0_and_nullptr/NULL says: "For pointers (address values), use nullptr, as this provides type-safety." Furthermore, NULL/0 won't compile if we change |SomeClass*| to |CheckedPtr<SomeClass>|. See go/miracleptr for more details. !! is used in situations where the pointer is assigned to or returned as bool, otherwise CheckedPtr's more costly implicit T* cast operator would kick in. !! isn't needed in boolean expressions. Examples here: https://chromium-review.googlesource.com/c/chromium/src/+/2226003 Bug: 1080832 Change-Id: I8b1fb6962ea9211ae0d29ab2c8dfba3749d0193b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2237526 Auto-Submit: Bartek Nowierski <bartekn@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Bartek Nowierski <bartekn@chromium.org> Cr-Commit-Position: refs/heads/master@{#777204}