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

Unified Diff: net/cookies/cookie_constants.h

Issue 14113014: Adding Priority field to cookies. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Created 7 years, 8 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 | « net/cookies/canonical_cookie_unittest.cc ('k') | net/cookies/cookie_constants.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_constants.h
diff --git a/net/cookies/cookie_constants.h b/net/cookies/cookie_constants.h
new file mode 100644
index 0000000000000000000000000000000000000000..0b14046455c4a89d138fb1b3ae1bb0b96b72dce5
--- /dev/null
+++ b/net/cookies/cookie_constants.h
@@ -0,0 +1,30 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_COOKIES_COOKIE_CONSTANTS_H_
+#define NET_COOKIES_COOKIE_CONSTANTS_H_
+
+#include <string>
+
+#include "net/base/net_export.h"
+
+namespace net {
+
+enum CookiePriority {
+ PRIORITY_LOW = 0,
erikwright (departed) 2013/04/18 19:33:19 Sorry to bring this up late in the game, but after
+ PRIORITY_MEDIUM = 1,
+ PRIORITY_HIGH = 2,
+ PRIORITY_DEFAULT = PRIORITY_MEDIUM
+};
+
+// Returns the Set-Cookie header priority token corresponding to |priority|.
+NET_EXPORT const std::string CookiePriorityToString(CookiePriority priority);
+
+// Converts the Set-Cookie header priority token |priority| to a CookiePriority.
+// Defaults to PRIORITY_DEFAULT for empty or unrecognized strings.
+NET_EXPORT CookiePriority StringToCookiePriority(const std::string& priority);
+
+} // namespace net
+
+#endif // NET_COOKIES_COOKIE_CONSTANTS_H_
« no previous file with comments | « net/cookies/canonical_cookie_unittest.cc ('k') | net/cookies/cookie_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698