| 244 | std::string Cookie::GetName() const { return cookie_name_; } |
| 245 | |
| 246 | void CookieCache::DiscardExpiredCookies() { |
| 247 | for (auto it = cookies.begin(); it != cookies.end();) { |
| 248 | if (it->second.IsExpired()) { |
| 249 | it = cookies.erase(it); |
| 250 | } else { |
| 251 | ++it; |
| 252 | } |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | void CookieCache::UpdateCachedCookies(const CallHeaders& incoming_headers) { |
| 257 | CookieHeaderPair header_values = incoming_headers.equal_range("set-cookie"); |