Use CanonicalCookie::FromStorage in cookie_fetcher_util.cc.
Using this factory method instead of CreateSanitizedCookie better expresses the intent of this code: to deserialize cookies that were already added to the cookie store. This mitigates a bug in the current code where cookies with a __Host- prefix would fail the check below. I believe this is what causes the crashes that causd us to change a DCHECK to an early return in http://crrev.com/c/2335554. Also since CanonicalCookie::FromStorage will DCHECK IsCanonical(), we do not need to check the CanonicalCookie's validity in this file. Bug: 1102874 Change-Id: I0759ecc155d9be84b0bae13064d8218702d4c8d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2456630 Commit-Queue: Dylan Cutler <dylancutler@google.com> Reviewed-by:Tommy Nyquist <nyquist@chromium.org> Reviewed-by:
Maksim Orlovich <morlovich@chromium.org> Cr-Commit-Position: refs/heads/master@{#815139}
Showing
Please register or sign in to comment