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

Unified Diff: net/base/cookie_monster.h

Issue 17045: CookieMonster edge-case parsing improvements and tests. (Closed)
Patch Set: Typo Created 11 years, 11 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/base/cookie_monster.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cookie_monster.h
diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h
index fef0e8fc1224f6b9d90aea45f6b3a431c0dcb46b..c9e48d753c30dea7429236c08f9d8d777be59f25 100644
--- a/net/base/cookie_monster.h
+++ b/net/base/cookie_monster.h
@@ -265,6 +265,10 @@ class CookieMonster::ParsedCookie {
bool IsSecure() const { return secure_index_ != 0; }
bool IsHttpOnly() const { return httponly_index_ != 0; }
+ // Return the number of attributes, for example, returning 2 for:
+ // "BLAH=hah; path=/; domain=.google.com"
+ size_t NumberOfAttributes() const { return pairs_.size() - 1; }
+
// For debugging only!
std::string DebugString() const;
« no previous file with comments | « no previous file | net/base/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698