| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_COOKIES_PARSED_COOKIE_H_ | 5 #ifndef NET_COOKIES_PARSED_COOKIE_H_ |
| 6 #define NET_COOKIES_PARSED_COOKIE_H_ | 6 #define NET_COOKIES_PARSED_COOKIE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // key/value pair shall not be removed. | 121 // key/value pair shall not be removed. |
| 122 bool SetAttributePair(size_t* index, | 122 bool SetAttributePair(size_t* index, |
| 123 const std::string& key, | 123 const std::string& key, |
| 124 const std::string& value); | 124 const std::string& value); |
| 125 | 125 |
| 126 // Removes the key/value pair from a cookie that is identified by |index|. | 126 // Removes the key/value pair from a cookie that is identified by |index|. |
| 127 // |index| refers to a position in |pairs_|. | 127 // |index| refers to a position in |pairs_|. |
| 128 void ClearAttributePair(size_t index); | 128 void ClearAttributePair(size_t index); |
| 129 | 129 |
| 130 PairList pairs_; | 130 PairList pairs_; |
| 131 bool is_valid_; | |
| 132 // These will default to 0, but that should never be valid since the | 131 // These will default to 0, but that should never be valid since the |
| 133 // 0th index is the user supplied token/value, not an attribute. | 132 // 0th index is the user supplied token/value, not an attribute. |
| 134 // We're really never going to have more than like 8 attributes, so we | 133 // We're really never going to have more than like 8 attributes, so we |
| 135 // could fit these into 3 bits each if we're worried about size... | 134 // could fit these into 3 bits each if we're worried about size... |
| 136 size_t path_index_; | 135 size_t path_index_; |
| 137 size_t domain_index_; | 136 size_t domain_index_; |
| 138 size_t expires_index_; | 137 size_t expires_index_; |
| 139 size_t maxage_index_; | 138 size_t maxage_index_; |
| 140 size_t secure_index_; | 139 size_t secure_index_; |
| 141 size_t httponly_index_; | 140 size_t httponly_index_; |
| 142 size_t priority_index_; | 141 size_t priority_index_; |
| 143 | 142 |
| 144 DISALLOW_COPY_AND_ASSIGN(ParsedCookie); | 143 DISALLOW_COPY_AND_ASSIGN(ParsedCookie); |
| 145 }; | 144 }; |
| 146 | 145 |
| 147 } // namespace net | 146 } // namespace net |
| 148 | 147 |
| 149 #endif // NET_COOKIES_COOKIE_MONSTER_H_ | 148 #endif // NET_COOKIES_COOKIE_MONSTER_H_ |
| OLD | NEW |