Add IsValid() to the base::MappedReadOnlyRegion
base::MappedReadOnlyRegion is a struct containing both a mapping and a
region. It was not always clear what the best way to check for error.
This CL adds a IsValid() method to this struct that allows to easily
perform the check.
Also this CL makes it explicit that base::MappedReadOnlyRegion has a
mapping and a region that are either both valid or invalid.
TBR=sky@chromium.org
Bug: 845086
Change-Id: Ia61b12816167592798fc6fcb8e49f09e0198ef48
Reviewed-on: https://chromium-review.googlesource.com/1068930
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560837}
CrOS-Libchrome-Original-Commit: 4c9e1d6dda390a3098071eab7d4282f30e462256
2 files changed