Refactor PpdCache's FindImpl() function.
- Use early returns to avoid 5 levels of indentations. - Call base::File::GetInfo() earlier to retrieve the file size, and avoid making a separate GetLength() call. - Use std::vector and avoid a memory allocation with "new". Change-Id: I8a036047df1b09ac0871ec6b264935c91c9b57c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2055996 Commit-Queue: Sean Kau <skau@chromium.org> Reviewed-by:Sean Kau <skau@chromium.org> Cr-Commit-Position: refs/heads/master@{#742524}
Showing
Please register or sign in to comment