| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Maps hostnames to custom content settings. Written on the UI thread and read | 5 // Maps hostnames to custom content settings. Written on the UI thread and read |
| 6 // on any thread. One instance per profile. | 6 // on any thread. One instance per profile. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ | 8 #ifndef CHROME_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ |
| 9 #define CHROME_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ | 9 #define CHROME_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 // invoked on an off-the-record map. | 217 // invoked on an off-the-record map. |
| 218 // | 218 // |
| 219 // This should only be called on the UI thread. | 219 // This should only be called on the UI thread. |
| 220 void SetBlockThirdPartyCookies(bool block); | 220 void SetBlockThirdPartyCookies(bool block); |
| 221 | 221 |
| 222 // Resets all settings levels. | 222 // Resets all settings levels. |
| 223 // | 223 // |
| 224 // This should only be called on the UI thread. | 224 // This should only be called on the UI thread. |
| 225 void ResetToDefaults(); | 225 void ResetToDefaults(); |
| 226 | 226 |
| 227 // Whether this settings map is associated with an OTR session. | |
| 228 bool IsOffTheRecord(); | |
| 229 | |
| 230 // NotificationObserver implementation. | 227 // NotificationObserver implementation. |
| 231 virtual void Observe(NotificationType type, | 228 virtual void Observe(NotificationType type, |
| 232 const NotificationSource& source, | 229 const NotificationSource& source, |
| 233 const NotificationDetails& details); | 230 const NotificationDetails& details); |
| 234 | 231 |
| 235 private: | 232 private: |
| 236 friend class base::RefCountedThreadSafe<HostContentSettingsMap>; | 233 friend class base::RefCountedThreadSafe<HostContentSettingsMap>; |
| 237 | 234 |
| 238 typedef std::pair<ContentSettingsType, std::string> | 235 typedef std::pair<ContentSettingsType, std::string> |
| 239 ContentSettingsTypeResourceIdentifierPair; | 236 ContentSettingsTypeResourceIdentifierPair; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 }; | 305 }; |
| 309 | 306 |
| 310 // Stream operator so HostContentSettingsMap::Pattern can be used in | 307 // Stream operator so HostContentSettingsMap::Pattern can be used in |
| 311 // assertion statements. | 308 // assertion statements. |
| 312 inline std::ostream& operator<<( | 309 inline std::ostream& operator<<( |
| 313 std::ostream& out, const HostContentSettingsMap::Pattern& pattern) { | 310 std::ostream& out, const HostContentSettingsMap::Pattern& pattern) { |
| 314 return out << pattern.AsString(); | 311 return out << pattern.AsString(); |
| 315 } | 312 } |
| 316 | 313 |
| 317 #endif // CHROME_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ | 314 #endif // CHROME_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ |
| OLD | NEW |