diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-29 22:42:48 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-29 22:42:48 +0000 |
commit | b75858a2c0bdb08b5324e2610d04498aadc9f600 (patch) | |
tree | c073defc27e3d23cba4720fcd3244dee63a6a0cc /chrome/browser/net/chrome_cookie_policy.h | |
parent | ea3d1d84be3d6f97bf50e76511c9e26af6895533 (diff) | |
download | chromium_src-b75858a2c0bdb08b5324e2610d04498aadc9f600.zip chromium_src-b75858a2c0bdb08b5324e2610d04498aadc9f600.tar.gz chromium_src-b75858a2c0bdb08b5324e2610d04498aadc9f600.tar.bz2 |
Revert r37535.
There was no LGTM, and there was still open discussion in the code review. See
http://codereview.chromium.org/554119. This was not ready to land.
TBR=pkasting
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/553154
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/chrome_cookie_policy.h')
-rw-r--r-- | chrome/browser/net/chrome_cookie_policy.h | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/chrome/browser/net/chrome_cookie_policy.h b/chrome/browser/net/chrome_cookie_policy.h deleted file mode 100644 index 88e698b..0000000 --- a/chrome/browser/net/chrome_cookie_policy.h +++ /dev/null @@ -1,81 +0,0 @@ -// 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. - -#ifndef CHROME_BROWSER_NET_CHROME_COOKIE_POLICY_H_ -#define CHROME_BROWSER_NET_CHROME_COOKIE_POLICY_H_ - -#include <map> -#include <string> - -#include "base/basictypes.h" -#include "base/lock.h" -#include "chrome/common/content_permission_types.h" -#include "net/base/cookie_policy.h" - -class GURL; -class PrefService; -class Profile; - -// The ChromeCookiePolicy class implements per-domain cookie policies. -class ChromeCookiePolicy : public net::CookiePolicy { - public: - typedef std::map<std::string, ContentPermissionType> CookiePolicies; - - explicit ChromeCookiePolicy(Profile* profile); - - virtual ~ChromeCookiePolicy() {} - - static void RegisterUserPrefs(PrefService* prefs); - - void ResetToDefaults(); - - // Consult the user's cookie blocking preferences to determine whether the - // URL's cookies can be read. - virtual bool CanGetCookies(const GURL& url, - const GURL& first_party_for_cookies); - - // Consult the user's cookie blocking preferences to determine whether the - // URL's cookies can be set. - virtual bool CanSetCookie(const GURL& url, - const GURL& first_party_for_cookies); - - // Sets per domain policies. A policy of type DEFAULT will erase the entry. - // - // This should be called only on the UI thread. - void SetPerDomainPermission(const std::string& domain, - ContentPermissionType type); - - // Returns all per domain policies. - // - // This can be called on any thread. - CookiePolicies GetAllPerDomainPermissions() const { - return per_domain_policy_; - } - - // Sets the current policy to enforce. - // - // This should be called only on the UI thread. - void set_type(Type type); - - // This can be called on any thread. - Type type() const { - AutoLock auto_lock(lock_); - return net::CookiePolicy::type(); - } - - protected: - ContentPermissionType CheckPermissionForHost(const std::string& host) const; - - Profile* profile_; - - mutable Lock lock_; - - // Local copy of prefs. - CookiePolicies per_domain_policy_; - - private: - DISALLOW_COPY_AND_ASSIGN(ChromeCookiePolicy); -}; - -#endif // CHROME_BROWSER_NET_CHROME_COOKIE_POLICY_H_ |