| OLD | NEW |
| 1 // Copyright (c) 2011 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 CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_BASE_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_BASE_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_BASE_PROVIDER_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_BASE_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 protected: | 78 protected: |
| 79 // Returns true if the |content_type| requires a resource identifier. | 79 // Returns true if the |content_type| requires a resource identifier. |
| 80 bool RequiresResourceIdentifier( | 80 bool RequiresResourceIdentifier( |
| 81 ContentSettingsType content_type) const; | 81 ContentSettingsType content_type) const; |
| 82 | 82 |
| 83 // Returns true if the passed |settings| object contains only | 83 // Returns true if the passed |settings| object contains only |
| 84 // CONTENT_SETTING_DEFAULT values. | 84 // CONTENT_SETTING_DEFAULT values. |
| 85 bool AllDefault(const ExtendedContentSettings& settings) const; | 85 bool AllDefault(const ExtendedContentSettings& settings) const; |
| 86 | 86 |
| 87 void UpdateContentSettingsMap( |
| 88 const ContentSettingsPattern& requesting_pattern, |
| 89 const ContentSettingsPattern& embedding_pattern, |
| 90 ContentSettingsType content_type, |
| 91 const ResourceIdentifier& resource_identifier, |
| 92 ContentSetting content_setting); |
| 93 |
| 87 // TODO(markusheintz): LEGACY method. Will be removed in a future re-factoring | 94 // TODO(markusheintz): LEGACY method. Will be removed in a future re-factoring |
| 88 // step. | 95 // step. |
| 89 ContentSettings GetNonDefaultContentSettings(const GURL& url) const; | 96 ContentSettings GetNonDefaultContentSettings(const GURL& url) const; |
| 90 | 97 |
| 91 // Accessors | 98 // Accessors |
| 92 HostContentSettings* host_content_settings() { | 99 HostContentSettings* host_content_settings() { |
| 93 return &host_content_settings_; | 100 return &host_content_settings_; |
| 94 } | 101 } |
| 95 | 102 |
| 96 HostContentSettings* off_the_record_settings() { | 103 HostContentSettings* off_the_record_settings() { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 118 HostContentSettings off_the_record_settings_; | 125 HostContentSettings off_the_record_settings_; |
| 119 | 126 |
| 120 // Used around accesses to the content_settings_ object to guarantee | 127 // Used around accesses to the content_settings_ object to guarantee |
| 121 // thread safety. | 128 // thread safety. |
| 122 mutable base::Lock lock_; | 129 mutable base::Lock lock_; |
| 123 }; | 130 }; |
| 124 | 131 |
| 125 } // namespace content_settings | 132 } // namespace content_settings |
| 126 | 133 |
| 127 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_BASE_PROVIDER_H_ | 134 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_BASE_PROVIDER_H_ |
| OLD | NEW |