summaryrefslogtreecommitdiffstats
path: root/net/cookies/parsed_cookie.h
diff options
context:
space:
mode:
authorerikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 18:39:04 +0000
committererikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 18:39:04 +0000
commitab2d75c8443526b2456e8cc1414f5211760c4d61 (patch)
tree41a4da732198f903e53e9a5815fd33c4727fdba2 /net/cookies/parsed_cookie.h
parent01021c4f97685dd139dd565926745ab9f779e07b (diff)
downloadchromium_src-ab2d75c8443526b2456e8cc1414f5211760c4d61.zip
chromium_src-ab2d75c8443526b2456e8cc1414f5211760c4d61.tar.gz
chromium_src-ab2d75c8443526b2456e8cc1414f5211760c4d61.tar.bz2
Adding Priority field to cookies.
This CL focuses on cookie parser, CanonicalCookie, and making callers pass PRIORITY_DEFAULT where applicable. What's NOT included in this CL: - TODO(rogerm): Persistence in SQL database. - TODO(huangs): Using cookie priority to affect cookie eviction. - TODO(huangs): Make priorities available for extension API (right now default value is used to set). - TODO(lower priority): Cookie viewer update. - TODO(lower priority): WebCookie update in webkit/glue. BUG=232693 Review URL: https://codereview.chromium.org/14113014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195245 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/cookies/parsed_cookie.h')
-rw-r--r--net/cookies/parsed_cookie.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/cookies/parsed_cookie.h b/net/cookies/parsed_cookie.h
index 43afa4b..93b2c23 100644
--- a/net/cookies/parsed_cookie.h
+++ b/net/cookies/parsed_cookie.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "net/base/net_export.h"
+#include "net/cookies/cookie_constants.h"
namespace net {
@@ -45,6 +46,7 @@ class NET_EXPORT ParsedCookie {
const std::string& MaxAge() const { return pairs_[maxage_index_].second; }
bool IsSecure() const { return secure_index_ != 0; }
bool IsHttpOnly() const { return httponly_index_ != 0; }
+ CookiePriority Priority() const;
// Returns the number of attributes, for example, returning 2 for:
// "BLAH=hah; path=/; domain=.google.com"
@@ -63,6 +65,7 @@ class NET_EXPORT ParsedCookie {
bool SetMaxAge(const std::string& maxage);
bool SetIsSecure(bool is_secure);
bool SetIsHttpOnly(bool is_http_only);
+ bool SetPriority(const std::string& priority);
// Returns the cookie description as it appears in a HTML response header.
std::string ToCookieLine() const;
@@ -134,6 +137,7 @@ class NET_EXPORT ParsedCookie {
size_t maxage_index_;
size_t secure_index_;
size_t httponly_index_;
+ size_t priority_index_;
DISALLOW_COPY_AND_ASSIGN(ParsedCookie);
};