summaryrefslogtreecommitdiffstats
path: root/net/base/cookie_policy.cc
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-23 18:11:10 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-23 18:11:10 +0000
commitcfd7332188b64787a9cb2b110957c0eb60b806a8 (patch)
treebd5072b446490dc3266dff44a627416f54404eb8 /net/base/cookie_policy.cc
parentd62c805ec92a9e00bfd97fc5a4d35103a8e89380 (diff)
downloadchromium_src-cfd7332188b64787a9cb2b110957c0eb60b806a8.zip
chromium_src-cfd7332188b64787a9cb2b110957c0eb60b806a8.tar.gz
chromium_src-cfd7332188b64787a9cb2b110957c0eb60b806a8.tar.bz2
Rename |policy_url| to |first_party_for_cookies|. This now matches the WebKit name for this piece of data.
R=jackson BUG=None TEST=No behavior change Review URL: http://codereview.chromium.org/115743 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16843 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cookie_policy.cc')
-rw-r--r--net/base/cookie_policy.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/base/cookie_policy.cc b/net/base/cookie_policy.cc
index d18db63..0092d8a 100644
--- a/net/base/cookie_policy.cc
+++ b/net/base/cookie_policy.cc
@@ -10,7 +10,8 @@
namespace net {
-bool CookiePolicy::CanGetCookies(const GURL& url, const GURL& policy_url) {
+bool CookiePolicy::CanGetCookies(const GURL& url,
+ const GURL& first_party_for_cookies) {
switch (type_) {
case CookiePolicy::ALLOW_ALL_COOKIES:
return true;
@@ -24,15 +25,16 @@ bool CookiePolicy::CanGetCookies(const GURL& url, const GURL& policy_url) {
}
}
-bool CookiePolicy::CanSetCookie(const GURL& url, const GURL& policy_url) {
+bool CookiePolicy::CanSetCookie(const GURL& url,
+ const GURL& first_party_for_cookies) {
switch (type_) {
case CookiePolicy::ALLOW_ALL_COOKIES:
return true;
case CookiePolicy::BLOCK_THIRD_PARTY_COOKIES:
- if (policy_url.is_empty())
- return true; // Empty policy URL should indicate a first-party request
- return net::RegistryControlledDomainService::SameDomainOrHost(url,
- policy_url);
+ if (first_party_for_cookies.is_empty())
+ return true; // Empty first-party URL indicates a first-party request.
+ return net::RegistryControlledDomainService::SameDomainOrHost(
+ url, first_party_for_cookies);
case CookiePolicy::BLOCK_ALL_COOKIES:
return false;
default: