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

Side by Side Diff: net/base/static_cookie_policy.h

Issue 7008025: Apply third party cookie blocking to all kinds of cookies (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_BASE_STATIC_COOKIE_POLICY_H_ 5 #ifndef NET_BASE_STATIC_COOKIE_POLICY_H_
6 #define NET_BASE_STATIC_COOKIE_POLICY_H_ 6 #define NET_BASE_STATIC_COOKIE_POLICY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string>
10
11 #include "base/basictypes.h" 9 #include "base/basictypes.h"
12 #include "net/base/net_api.h" 10 #include "net/base/net_api.h"
13 11
14 class GURL; 12 class GURL;
15 13
16 namespace net { 14 namespace net {
17 15
18 // The StaticCookiePolicy class implements a static cookie policy that supports 16 // The StaticCookiePolicy class implements a static cookie policy that supports
19 // three modes: allow all, deny all, or block third-party cookies. 17 // three modes: allow all, deny all, or block third-party cookies.
20 class NET_API StaticCookiePolicy { 18 class NET_API StaticCookiePolicy {
(...skipping 24 matching lines...) Expand all
45 void set_type(Type type) { type_ = type; } 43 void set_type(Type type) { type_ = type; }
46 Type type() const { return type_; } 44 Type type() const { return type_; }
47 45
48 // Consults the user's third-party cookie blocking preferences to determine 46 // Consults the user's third-party cookie blocking preferences to determine
49 // whether the URL's cookies can be read. 47 // whether the URL's cookies can be read.
50 int CanGetCookies(const GURL& url, const GURL& first_party_for_cookies) const; 48 int CanGetCookies(const GURL& url, const GURL& first_party_for_cookies) const;
51 49
52 // Consults the user's third-party cookie blocking preferences to determine 50 // Consults the user's third-party cookie blocking preferences to determine
53 // whether the URL's cookies can be set. 51 // whether the URL's cookies can be set.
54 int CanSetCookie(const GURL& url, 52 int CanSetCookie(const GURL& url,
55 const GURL& first_party_for_cookies, 53 const GURL& first_party_for_cookies) const;
56 const std::string& cookie_line) const;
57 54
58 private: 55 private:
59 Type type_; 56 Type type_;
60 57
61 DISALLOW_COPY_AND_ASSIGN(StaticCookiePolicy); 58 DISALLOW_COPY_AND_ASSIGN(StaticCookiePolicy);
62 }; 59 };
63 60
64 } // namespace net 61 } // namespace net
65 62
66 #endif // NET_BASE_STATIC_COOKIE_POLICY_H_ 63 #endif // NET_BASE_STATIC_COOKIE_POLICY_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_bubble_model.cc ('k') | net/base/static_cookie_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698