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

Unified Diff: net/base/static_cookie_policy.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
diff --git a/net/base/static_cookie_policy.cc b/net/base/static_cookie_policy.cc
deleted file mode 100644
index 021cacef4cae27310773b60e0e5ca1351d4e51ae..0000000000000000000000000000000000000000
--- a/net/base/static_cookie_policy.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2012 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/static_cookie_policy.h"
-
-#include "base/logging.h"
-#include "net/base/net_errors.h"
-#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
-#include "url/gurl.h"
-
-namespace net {
-
-int StaticCookiePolicy::CanGetCookies(
- const GURL& url,
- const GURL& first_party_for_cookies) const {
- switch (type_) {
- case StaticCookiePolicy::ALLOW_ALL_COOKIES:
- return OK;
- case StaticCookiePolicy::BLOCK_ALL_THIRD_PARTY_COOKIES:
- if (first_party_for_cookies.is_empty())
- return OK; // Empty first-party URL indicates a first-party request.
- return registry_controlled_domains::SameDomainOrHost(
- url,
- first_party_for_cookies,
- registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES) ?
- OK : ERR_ACCESS_DENIED;
- case StaticCookiePolicy::BLOCK_ALL_COOKIES:
- return ERR_ACCESS_DENIED;
- default:
- NOTREACHED();
- return ERR_ACCESS_DENIED;
- }
-}
-
-int StaticCookiePolicy::CanSetCookie(
- const GURL& url,
- const GURL& first_party_for_cookies) const {
- switch (type_) {
- case StaticCookiePolicy::ALLOW_ALL_COOKIES:
- return OK;
- case StaticCookiePolicy::BLOCK_ALL_THIRD_PARTY_COOKIES:
- if (first_party_for_cookies.is_empty())
- return OK; // Empty first-party URL indicates a first-party request.
- return registry_controlled_domains::SameDomainOrHost(
- url,
- first_party_for_cookies,
- registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES) ?
- OK : ERR_ACCESS_DENIED;
- case StaticCookiePolicy::BLOCK_ALL_COOKIES:
- return ERR_ACCESS_DENIED;
- default:
- NOTREACHED();
- return ERR_ACCESS_DENIED;
- }
-}
-
-} // 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