Make CSVPassword::Parse differentiate failures
Parsing a single CSV row inside CSVPassword::Parse can fail for two reasons: bad syntax, or incorrect semantics. So far, both cases have been reported simply as an error. Soon, the distinction will be needed to correctly report from CSVPasswordSequence. Therefore this CL changes the return type of CSVPassword::Parse from Boolean (whether parsing failed) to a new status enum (how it failed): OK, Syntax error or Semantic error. This enum describes a subset of ParserState::Result, but ParserState::Result was not directly used here, because the CSV logic should not know about its own client code. Bug: 934326 Change-Id: I621e2faa38241541d684357b2f54d9f5fb8ed923 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1908528 Commit-Queue: Vaclav Brozek <vabr@chromium.org> Reviewed-by:Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#714521}
Showing
Please register or sign in to comment