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..3afe4fae9782c5ebd1667c0068051e9313800fe0 |
--- /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, |
+ PRIORITY_MEDIUM = 1, |
+ PRIORITY_HIGH = 2, |
+ PRIORITY_DEFAULT = PRIORITY_MEDIUM |
+}; |
+ |
+// Returns a constant string for a given |priority|. |
erikwright (departed)
2013/04/15 19:00:37
"Returns the Set-Cookie header priority token corr
huangs
2013/04/15 21:29:40
Done.
|
+NET_EXPORT const std::string PriorityToString(CookiePriority priority); |
erikwright (departed)
2013/04/15 19:00:37
CookiePriorityToString
huangs
2013/04/15 21:29:40
Done.
|
+ |
+// Returns enum for cookie priority string (case-insentive compare). Defaults to |
+// PRIORITY_DEFAULT for empty or unrecognized strings. |
erikwright (departed)
2013/04/15 19:00:37
Converts the Set-Cookie header priority token |pri
huangs
2013/04/15 21:29:40
Done.
|
+NET_EXPORT CookiePriority StringToPriority(const std::string& priority_str); |
erikwright (departed)
2013/04/15 19:00:37
remove "_str". Optionally, "priority_token"
erikwright (departed)
2013/04/15 19:00:37
StringToCookiePriority
huangs
2013/04/15 21:29:40
Done.
huangs
2013/04/15 21:29:40
Done (using just |priority|).
|
+ |
+} // namespace net |
+ |
+#endif // NET_COOKIES_COOKIE_CONSTANTS_H_ |