DescriptionReplace std::string::find with base::StartsWith when comparing cookie paths.
The old code was correct, and the performance benefits are minimal, but
"path1.find(path2) != 0" is a bit obscure.
Also switch DeleteCookie to CanonicalCookie::IsOnPath to compare cookies,
to match normal cookie semantics.
BUG=583482
Committed: https://crrev.com/23b6717eac3a002b02aa9951d62bec2b641fe947
Cr-Commit-Position: refs/heads/master@{#379092}
Patch Set 1 #Patch Set 2 : Fix inverted check #Patch Set 3 : Add test #Patch Set 4 : Fix #Patch Set 5 : Remove new test case #
Total comments: 8
Messages
Total messages: 23 (10 generated)
|