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

Unified Diff: net/cookies/canonical_cookie.h

Issue 11308272: Add IncludeForRequestURL method to CanonicalCookie (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 years 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') | no next file with comments »
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 0612991eddbb082a507e9e2ab2236fa598d4febe..614b8e92433732b86beffa2e00208bc3a8b80460 100644
--- a/net/cookies/canonical_cookie.h
+++ b/net/cookies/canonical_cookie.h
@@ -110,12 +110,24 @@ class NET_EXPORT CanonicalCookie {
last_access_date_ = date;
}
+ // Returns true if the given |url_path| path-matches the cookie-path as
+ // described in section 5.1.4 in RFC 6265.
bool IsOnPath(const std::string& url_path) const;
+
+ // Returns true if the cookie domain matches the given |host| as described in
+ // section 5.1.3 of RFC 6265.
bool IsDomainMatch(const std::string& host) const;
+ // Returns true if the cookie should be included for the given request |url|.
+ // HTTP only cookies can be filter by using appropriate cookie |options|.
+ // PLEASE NOTE that this method does not check whether a cookie is expired or
+ // not!
+ bool IncludeForRequestURL(const GURL& url,
+ const CookieOptions& options) const;
+
std::string DebugString() const;
- // Returns the cookie source when cookies are set for |url|. This function
+ // Returns the cookie source when cookies are set for |url|. This function
// is public for unit test purposes only.
static std::string GetCookieSourceFromURL(const GURL& url);
static std::string CanonPath(const GURL& url, const ParsedCookie& pc);
« no previous file with comments | « no previous file | net/cookies/canonical_cookie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698