clean up image policy code
1. use ResourceResponse::ExpectedContentLength to get image file size.
2. merge image policy violation check into one place.
Note: ValidateImagePolicies will later be called through the
pipeline described in here:
https://docs.google.com/document/d/1B_GnzEItUXsUUQXtB1zMiiov86_U1BCFo1F8g5F_yOY
to unload unoptimized images as early as possible.
Bug:910195
Change-Id: Iab2fc2fee4f2963c308ca1cc585259021a86b3f2
Reviewed-on: https://chromium-review.googlesource.com/c/1355330
Commit-Queue: Luna Lu <loonybear@chromium.org>
Reviewed-by:
Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612362}
Showing
Please register or sign in to comment