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

Unified Diff: net/cookies/cookie_monster.cc

Issue 11308272: Add IncludeForRequestURL method to CanonicalCookie (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « net/cookies/canonical_cookie.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698