| OLD | NEW |
| 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 Loading... |
| 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. |
| 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_ |
| OLD | NEW |