| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 return block_nonsandboxed_plugins_; | 223 return block_nonsandboxed_plugins_; |
| 224 } | 224 } |
| 225 | 225 |
| 226 void SetBlockNonsandboxedPlugins(bool block); | 226 void SetBlockNonsandboxedPlugins(bool block); |
| 227 | 227 |
| 228 // Resets all settings levels. | 228 // Resets all settings levels. |
| 229 // | 229 // |
| 230 // This should only be called on the UI thread. | 230 // This should only be called on the UI thread. |
| 231 void ResetToDefaults(); | 231 void ResetToDefaults(); |
| 232 | 232 |
| 233 // Whether this settings map is associated with an OTR session. | |
| 234 bool IsOffTheRecord(); | |
| 235 | |
| 236 // NotificationObserver implementation. | 233 // NotificationObserver implementation. |
| 237 virtual void Observe(NotificationType type, | 234 virtual void Observe(NotificationType type, |
| 238 const NotificationSource& source, | 235 const NotificationSource& source, |
| 239 const NotificationDetails& details); | 236 const NotificationDetails& details); |
| 240 | 237 |
| 241 private: | 238 private: |
| 242 friend class base::RefCountedThreadSafe<HostContentSettingsMap>; | 239 friend class base::RefCountedThreadSafe<HostContentSettingsMap>; |
| 243 | 240 |
| 244 typedef std::pair<ContentSettingsType, std::string> | 241 typedef std::pair<ContentSettingsType, std::string> |
| 245 ContentSettingsTypeResourceIdentifierPair; | 242 ContentSettingsTypeResourceIdentifierPair; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 }; | 312 }; |
| 316 | 313 |
| 317 // Stream operator so HostContentSettingsMap::Pattern can be used in | 314 // Stream operator so HostContentSettingsMap::Pattern can be used in |
| 318 // assertion statements. | 315 // assertion statements. |
| 319 inline std::ostream& operator<<( | 316 inline std::ostream& operator<<( |
| 320 std::ostream& out, const HostContentSettingsMap::Pattern& pattern) { | 317 std::ostream& out, const HostContentSettingsMap::Pattern& pattern) { |
| 321 return out << pattern.AsString(); | 318 return out << pattern.AsString(); |
| 322 } | 319 } |
| 323 | 320 |
| 324 #endif // CHROME_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ | 321 #endif // CHROME_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ |
| OLD | NEW |