Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: net/cookies/canonical_cookie.h

Issue 1000103002: Add a method to override all the cookies in CookieMonster (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/cookies/canonical_cookie.cc » ('j') | net/cookies/cookie_monster_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/canonical_cookie.h
diff --git a/net/cookies/canonical_cookie.h b/net/cookies/canonical_cookie.h
index 27051a32043c0571c4ee85770638057f3bf180fb..30fb3e764aaf3afd6dd8e064827a5c525283a397 100644
--- a/net/cookies/canonical_cookie.h
+++ b/net/cookies/canonical_cookie.h
@@ -136,6 +136,18 @@ class NET_EXPORT CanonicalCookie {
const base::Time& current,
const base::Time& server_time);
+ // Cookie ordering methods.
+
+ // Returns true if the cookie is less than |other|, considering only name,
+ // domain and path. In particular, two equivalent cookies (see IsEquivalent())
+ // are identical for PartialCompare().
+ bool PartialCompare(const CanonicalCookie& other) const;
+
+ // Returns true if the cookie is less than |other|, considering all fields.
+ // FullCompare() is consistent with PartialCompare(): cookies sorted using
+ // FullCompare() are also sorted with respect to PartialCompare().
+ bool FullCompare(const CanonicalCookie& other) const;
+
private:
// The source member of a canonical cookie is the origin of the URL that tried
// to set this cookie, minus the port number if any. This field is not
« no previous file with comments | « no previous file | net/cookies/canonical_cookie.cc » ('j') | net/cookies/cookie_monster_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698