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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // | 70 // |
71 // This may be called on any thread. | 71 // This may be called on any thread. |
72 void GetCookieSettings(ContentSettingsForOneType* settings) const; | 72 void GetCookieSettings(ContentSettingsForOneType* settings) const; |
73 | 73 |
74 // Sets the default content setting (CONTENT_SETTING_ALLOW, | 74 // Sets the default content setting (CONTENT_SETTING_ALLOW, |
75 // CONTENT_SETTING_BLOCK, or CONTENT_SETTING_SESSION_ONLY) for cookies. | 75 // CONTENT_SETTING_BLOCK, or CONTENT_SETTING_SESSION_ONLY) for cookies. |
76 // | 76 // |
77 // This should only be called on the UI thread. | 77 // This should only be called on the UI thread. |
78 void SetDefaultCookieSetting(ContentSetting setting); | 78 void SetDefaultCookieSetting(ContentSetting setting); |
79 | 79 |
80 // Sets the cookie setting for the given patterns. | 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 ContentSettingsPattern& primary_pattern, | 83 void SetCookieSetting(const GURL& primary_url, ContentSetting setting); |
84 const ContentSettingsPattern& secondary_pattern, | |
85 ContentSetting setting); | |
86 | 84 |
87 // Resets the cookie setting for the given patterns. | 85 // Resets the cookie setting for the given patterns. |
88 // | 86 // |
89 // This should only be called on the UI thread. | 87 // This should only be called on the UI thread. |
90 void ResetCookieSetting(const ContentSettingsPattern& primary_pattern, | 88 void ResetCookieSetting(const ContentSettingsPattern& primary_pattern, |
91 const ContentSettingsPattern& secondary_pattern); | 89 const ContentSettingsPattern& secondary_pattern); |
92 | 90 |
93 bool IsStorageDurable(const GURL& origin) const; | 91 bool IsStorageDurable(const GURL& origin) const; |
94 | 92 |
95 // Detaches the |CookieSettings| from |PrefService|. This methods needs to be | 93 // Detaches the |CookieSettings| from |PrefService|. This methods needs to be |
(...skipping 30 matching lines...) Expand all Loading... |
126 mutable base::Lock lock_; | 124 mutable base::Lock lock_; |
127 | 125 |
128 bool block_third_party_cookies_; | 126 bool block_third_party_cookies_; |
129 | 127 |
130 DISALLOW_COPY_AND_ASSIGN(CookieSettings); | 128 DISALLOW_COPY_AND_ASSIGN(CookieSettings); |
131 }; | 129 }; |
132 | 130 |
133 } // namespace content_settings | 131 } // namespace content_settings |
134 | 132 |
135 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_COOKIE_SETTINGS_H_ | 133 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_COOKIE_SETTINGS_H_ |
OLD | NEW |