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

Unified Diff: net/base/static_cookie_policy.cc

Issue 556095: Changes to support new cookie policy.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 months 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/base/static_cookie_policy.h ('k') | net/base/static_cookie_policy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/static_cookie_policy.cc
===================================================================
--- net/base/static_cookie_policy.cc (revision 37557)
+++ net/base/static_cookie_policy.cc (working copy)
@@ -1,8 +1,8 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/base/cookie_policy.h"
+#include "net/base/static_cookie_policy.h"
#include "base/logging.h"
#include "googleurl/src/gurl.h"
@@ -10,14 +10,14 @@
namespace net {
-bool CookiePolicy::CanGetCookies(const GURL& url,
- const GURL& first_party_for_cookies) {
+bool StaticCookiePolicy::CanGetCookies(const GURL& url,
+ const GURL& first_party_for_cookies) {
switch (type_) {
- case CookiePolicy::ALLOW_ALL_COOKIES:
+ case StaticCookiePolicy::ALLOW_ALL_COOKIES:
return true;
- case CookiePolicy::BLOCK_THIRD_PARTY_COOKIES:
+ case StaticCookiePolicy::BLOCK_THIRD_PARTY_COOKIES:
return true;
- case CookiePolicy::BLOCK_ALL_COOKIES:
+ case StaticCookiePolicy::BLOCK_ALL_COOKIES:
return false;
default:
NOTREACHED();
@@ -25,17 +25,17 @@
}
}
-bool CookiePolicy::CanSetCookie(const GURL& url,
- const GURL& first_party_for_cookies) {
+bool StaticCookiePolicy::CanSetCookie(const GURL& url,
+ const GURL& first_party_for_cookies) {
switch (type_) {
- case CookiePolicy::ALLOW_ALL_COOKIES:
+ case StaticCookiePolicy::ALLOW_ALL_COOKIES:
return true;
- case CookiePolicy::BLOCK_THIRD_PARTY_COOKIES:
+ case StaticCookiePolicy::BLOCK_THIRD_PARTY_COOKIES:
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:
+ case StaticCookiePolicy::BLOCK_ALL_COOKIES:
return false;
default:
NOTREACHED();
@@ -43,7 +43,4 @@
}
}
-CookiePolicy::CookiePolicy() : type_(CookiePolicy::ALLOW_ALL_COOKIES) {
-}
-
} // namespace net
« no previous file with comments | « net/base/static_cookie_policy.h ('k') | net/base/static_cookie_policy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698