Chromium Code Reviews| Index: net/cookies/cookie_monster.cc |
| diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc |
| index 3397628003a1795750a0f7db45b4ef399267c568..4f38d7e45f9e571bb6c67dd2e882637435d90971 100644 |
| --- a/net/cookies/cookie_monster.cc |
| +++ b/net/cookies/cookie_monster.cc |
| @@ -1602,9 +1602,6 @@ void CookieMonster::FindCookiesForKey( |
| std::vector<CanonicalCookie*>* cookies) { |
| lock_.AssertAcquired(); |
| - const std::string host(url.host()); |
| - bool secure = url.SchemeIsSecure(); |
| - |
| for (CookieMapItPair its = cookies_.equal_range(key); |
| its.first != its.second; ) { |
| CookieMap::iterator curit = its.first; |
| @@ -1621,18 +1618,12 @@ void CookieMonster::FindCookiesForKey( |
| if (options.exclude_httponly() && cc->IsHttpOnly()) |
| continue; |
|
markusheintz_
2012/11/29 15:16:14
I think I should even move the if above to the new
|
| - // Filter out secure cookies unless we're https. |
| - if (!secure && cc->IsSecure()) |
| - continue; |
| - |
| - // Filter out cookies that don't apply to this domain. |
| - if (!cc->IsDomainMatch(host)) |
| - continue; |
| - |
| - if (!cc->IsOnPath(url.path())) |
| + // Filter out cookies that should not be included for a request to the |
| + // given |url|. |
| + if (!cc->IncludeForRequest(url)) |
| continue; |
| - // Add this cookie to the set of matching cookies. Update the access |
| + // Add this cookie to the set of matching cookies. Update the access |
| // time if we've been requested to do so. |
| if (update_access_time) { |
| InternalUpdateCookieAccessTime(cc, current); |