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

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

Issue 6207005: Clarify wording around blocking 3rd party cookies and add lab to block reading of 3rd party cookies (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | net/base/static_cookie_policy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "net/base/cookie_policy.h" 12 #include "net/base/cookie_policy.h"
13 13
14 class GURL; 14 class GURL;
15 15
16 namespace net { 16 namespace net {
17 17
18 // The StaticCookiePolicy class implements a static cookie policy that supports 18 // The StaticCookiePolicy class implements a static cookie policy that supports
19 // three modes: allow all, deny all, or block third-party cookies. 19 // three modes: allow all, deny all, or block third-party cookies.
20 // 20 //
21 // NOTE: This CookiePolicy implementation always completes synchronously. The 21 // NOTE: This CookiePolicy implementation always completes synchronously. The
22 // callback parameter will be ignored if specified. Just pass NULL. 22 // callback parameter will be ignored if specified. Just pass NULL.
23 // 23 //
24 class StaticCookiePolicy : public CookiePolicy { 24 class StaticCookiePolicy : public CookiePolicy {
25 public: 25 public:
26 // Do not change the order of these types as they are persisted in
27 // preferences.
26 enum Type { 28 enum Type {
27 ALLOW_ALL_COOKIES = 0, // Do not perform any cookie blocking. 29 // Do not perform any cookie blocking.
28 BLOCK_THIRD_PARTY_COOKIES, // Prevent third-party cookies from being set. 30 ALLOW_ALL_COOKIES = 0,
29 BLOCK_ALL_COOKIES // Disable cookies. 31 // Prevent third-party cookies from being set.
32 BLOCK_SETTING_THIRD_PARTY_COOKIES,
33 // Disable cookies.
34 BLOCK_ALL_COOKIES,
35 // Prevent third-party cookies from being set or read.
36 BLOCK_ALL_THIRD_PARTY_COOKIES
Randy Smith (Not in Mondays) 2011/01/11 18:38:42 This section seems a bit awkward to me; the combin
30 }; 37 };
31 38
32 StaticCookiePolicy() 39 StaticCookiePolicy()
33 : type_(StaticCookiePolicy::ALLOW_ALL_COOKIES) { 40 : type_(StaticCookiePolicy::ALLOW_ALL_COOKIES) {
34 } 41 }
35 42
36 explicit StaticCookiePolicy(Type type) 43 explicit StaticCookiePolicy(Type type)
37 : type_(type) { 44 : type_(type) {
38 } 45 }
39 46
(...skipping 19 matching lines...) Expand all
59 66
60 private: 67 private:
61 Type type_; 68 Type type_;
62 69
63 DISALLOW_COPY_AND_ASSIGN(StaticCookiePolicy); 70 DISALLOW_COPY_AND_ASSIGN(StaticCookiePolicy);
64 }; 71 };
65 72
66 } // namespace net 73 } // namespace net
67 74
68 #endif // NET_BASE_STATIC_COOKIE_POLICY_H_ 75 #endif // NET_BASE_STATIC_COOKIE_POLICY_H_
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | net/base/static_cookie_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698