AppCache: Clean up manifest parsing algorithm implementation.
This cleanup refactors content::ParseManifest(). The main outcome is separating low-level string manipulation (previously using C-style pointers) from the higher-level logic for interpreting manifest data. The desired benefit is being able to easily reason about the (standard and proprietary) AppCache features that Chrome supports. The CL relies heavily on base::StringPiece for string parsing, which uses a (start, length) representation. Updating this requires more work than the previous (start, end) representation. The extra work should be outweighed by the performance savings of the new approach. * URLs are not re-encoded from std::wstring to UTF16. * Keywords are encoded as static base::StringPiece instances, avoiding some strlen() calls. Bug: 879224 Change-Id: Ia8ecdb9453a103b7c6bfed8bc80ecf159095afc5 Reviewed-on: https://chromium-review.googlesource.com/1192985 Commit-Queue: Victor Costan <pwnall@chromium.org> Reviewed-by:Joshua Bell <jsbell@chromium.org> Cr-Commit-Position: refs/heads/master@{#588251}
Showing
This diff is collapsed.
Please register or sign in to comment