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

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

Issue 2655443003: Unify the "get" and "set" cookie access settings. (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « ios/chrome/browser/net/ios_chrome_network_delegate.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) 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 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "net/base/net_export.h" 9 #include "net/base/net_export.h"
10 10
(...skipping 23 matching lines...) Expand all
34 explicit StaticCookiePolicy(Type type) 34 explicit StaticCookiePolicy(Type type)
35 : type_(type) { 35 : type_(type) {
36 } 36 }
37 37
38 // Sets the current policy to enforce. This should be called when the user's 38 // Sets the current policy to enforce. This should be called when the user's
39 // preferences change. 39 // preferences change.
40 void set_type(Type type) { type_ = type; } 40 void set_type(Type type) { type_ = type; }
41 Type type() const { return type_; } 41 Type type() const { return type_; }
42 42
43 // Consults the user's third-party cookie blocking preferences to determine 43 // Consults the user's third-party cookie blocking preferences to determine
44 // whether the URL's cookies can be read. 44 // whether the URL's cookies can be accessed (i.e., can be get or set).
45 int CanGetCookies(const GURL& url, const GURL& first_party_for_cookies) const; 45 int CanAccessCookies(const GURL& url,
46 46 const GURL& first_party_for_cookies) const;
47 // Consults the user's third-party cookie blocking preferences to determine
48 // whether the URL's cookies can be set.
49 int CanSetCookie(const GURL& url,
50 const GURL& first_party_for_cookies) const;
51 47
52 private: 48 private:
53 Type type_; 49 Type type_;
54 50
55 DISALLOW_COPY_AND_ASSIGN(StaticCookiePolicy); 51 DISALLOW_COPY_AND_ASSIGN(StaticCookiePolicy);
56 }; 52 };
57 53
58 } // namespace net 54 } // namespace net
59 55
60 #endif // NET_BASE_STATIC_COOKIE_POLICY_H_ 56 #endif // NET_BASE_STATIC_COOKIE_POLICY_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/net/ios_chrome_network_delegate.cc ('k') | net/base/static_cookie_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698