Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CookieAccessSemantics to cookie change notifications
[Merge to M79] This change adds a CookieAccessSemantics field to the cookie change notification interfaces, such that the access semantics of a cookie at the time of the reported change can also be included in the change notification. The CookieAccessSemantics is used to determine whether a cookie should be treated according to "legacy" rules, based on a policy setting. It affects whether the cookie may be included on a given request, and some cookie change consumers care about this because they check whether the cookie change should be observed based on whether it would have been included on a request. This is accomplished by bundling the changed cookie, the CookieAccessSemantics, and CookieChangeCause into a new struct, CookieChangeInfo, and passing a CookieChangeInfo along to notification subscribers. This change should not produce any behavior change for consumers who don't care about the CookieAccessSemantics, which is most of them, for which this will just pass them an extra parameter that they don't need. The places where behavior changes are in the CookieStore API (CookieChangeSubscription::ShouldObserveChangeTo), the RestrictedCookieManager::Listener (OnCookieChange), and CookieMonsterChangeDispatcher::Subscription (DispatchChange), where now the call to CanonicalCookie::IncludeForRequestURL is able to pass the CookieAccessSemantics in order to properly compute whether the cookie change should be observed. TBR=khorimoto@chromium.org (cherry picked from commit 19cced4) Bug: 978172 Change-Id: I712972391ff0adcc4b94481bba156dc0e7b759a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1854649 Reviewed-by: Lily Chen <chlily@chromium.org> Reviewed-by: David Roger <droger@chromium.org> Reviewed-by: Mohammad Refaat <mrefaat@chromium.org> Reviewed-by: Wez <wez@chromium.org> Reviewed-by: Victor Costan <pwnall@chromium.org> Reviewed-by: Richard Coles <torne@chromium.org> Reviewed-by: Karan Bhatia <karandeepb@chromium.org> Reviewed-by: Marijn Kruisselbrink <mek@chromium.org> Reviewed-by: Maksim Orlovich <morlovich@chromium.org> Reviewed-by: Martin Barbella <mbarbella@chromium.org> Commit-Queue: Lily Chen <chlily@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#707116} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1872783 Cr-Commit-Position: refs/branch-heads/3945@{#27} Cr-Branched-From: e4635ff-refs/heads/master@{#706915}
- Loading branch information
Showing
49 changed files
with
1,660 additions
and
998 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.