| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_COOKIE_SETTINGS_H_ | 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_COOKIE_SETTINGS_H_ |
| 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_COOKIE_SETTINGS_H_ | 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_COOKIE_SETTINGS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Sets the cookie setting for the given url. | 80 // Sets the cookie setting for the given url. |
| 81 // | 81 // |
| 82 // This should only be called on the UI thread. | 82 // This should only be called on the UI thread. |
| 83 void SetCookieSetting(const GURL& primary_url, ContentSetting setting); | 83 void SetCookieSetting(const GURL& primary_url, ContentSetting setting); |
| 84 | 84 |
| 85 // Resets the cookie setting for the given url. | 85 // Resets the cookie setting for the given url. |
| 86 // | 86 // |
| 87 // This should only be called on the UI thread. | 87 // This should only be called on the UI thread. |
| 88 void ResetCookieSetting(const GURL& primary_url); | 88 void ResetCookieSetting(const GURL& primary_url); |
| 89 | 89 |
| 90 bool IsStorageDurable(const GURL& origin) const; |
| 91 |
| 90 // Detaches the |CookieSettings| from |PrefService|. This methods needs to be | 92 // Detaches the |CookieSettings| from |PrefService|. This methods needs to be |
| 91 // called before destroying the service. Afterwards, only const methods can be | 93 // called before destroying the service. Afterwards, only const methods can be |
| 92 // called. | 94 // called. |
| 93 void ShutdownOnUIThread() override; | 95 void ShutdownOnUIThread() override; |
| 94 | 96 |
| 95 // A helper for applying third party cookie blocking rules. | 97 // A helper for applying third party cookie blocking rules. |
| 96 ContentSetting GetCookieSetting( | 98 ContentSetting GetCookieSetting( |
| 97 const GURL& url, | 99 const GURL& url, |
| 98 const GURL& first_party_url, | 100 const GURL& first_party_url, |
| 99 bool setting_cookie, | 101 bool setting_cookie, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 121 mutable base::Lock lock_; | 123 mutable base::Lock lock_; |
| 122 | 124 |
| 123 bool block_third_party_cookies_; | 125 bool block_third_party_cookies_; |
| 124 | 126 |
| 125 DISALLOW_COPY_AND_ASSIGN(CookieSettings); | 127 DISALLOW_COPY_AND_ASSIGN(CookieSettings); |
| 126 }; | 128 }; |
| 127 | 129 |
| 128 } // namespace content_settings | 130 } // namespace content_settings |
| 129 | 131 |
| 130 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_COOKIE_SETTINGS_H_ | 132 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_COOKIE_SETTINGS_H_ |
| OLD | NEW |