| OLD | NEW |
| 1 // Copyright (c) 2010 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> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // Sets the current policy to enforce. This should be called when the user's | 47 // Sets the current policy to enforce. This should be called when the user's |
| 48 // preferences change. | 48 // preferences change. |
| 49 void set_type(Type type) { type_ = type; } | 49 void set_type(Type type) { type_ = type; } |
| 50 Type type() const { return type_; } | 50 Type type() const { return type_; } |
| 51 | 51 |
| 52 // CookiePolicy methods: | 52 // CookiePolicy methods: |
| 53 | 53 |
| 54 // Consults the user's third-party cookie blocking preferences to determine | 54 // Consults the user's third-party cookie blocking preferences to determine |
| 55 // whether the URL's cookies can be read. | 55 // whether the URL's cookies can be read. |
| 56 virtual int CanGetCookies(const GURL& url, | 56 virtual int CanGetCookies(const GURL& url, |
| 57 const GURL& first_party_for_cookies, | 57 const GURL& first_party_for_cookies) const; |
| 58 CompletionCallback* callback); | |
| 59 | 58 |
| 60 // Consults the user's third-party cookie blocking preferences to determine | 59 // Consults the user's third-party cookie blocking preferences to determine |
| 61 // whether the URL's cookies can be set. | 60 // whether the URL's cookies can be set. |
| 62 virtual int CanSetCookie(const GURL& url, | 61 virtual int CanSetCookie(const GURL& url, |
| 63 const GURL& first_party_for_cookies, | 62 const GURL& first_party_for_cookies, |
| 64 const std::string& cookie_line, | 63 const std::string& cookie_line) const; |
| 65 CompletionCallback* callback); | |
| 66 | 64 |
| 67 private: | 65 private: |
| 68 Type type_; | 66 Type type_; |
| 69 | 67 |
| 70 DISALLOW_COPY_AND_ASSIGN(StaticCookiePolicy); | 68 DISALLOW_COPY_AND_ASSIGN(StaticCookiePolicy); |
| 71 }; | 69 }; |
| 72 | 70 |
| 73 } // namespace net | 71 } // namespace net |
| 74 | 72 |
| 75 #endif // NET_BASE_STATIC_COOKIE_POLICY_H_ | 73 #endif // NET_BASE_STATIC_COOKIE_POLICY_H_ |
| OLD | NEW |