| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CONTENT_SETTINGS_PREF_H_ | 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_PREF_H_ |
| 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_PREF_H_ | 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_PREF_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // Callback for changes in the pref with the same name. | 89 // Callback for changes in the pref with the same name. |
| 90 void OnPrefChanged(); | 90 void OnPrefChanged(); |
| 91 | 91 |
| 92 // Update the preference that stores content settings exceptions and syncs the | 92 // Update the preference that stores content settings exceptions and syncs the |
| 93 // value to the obsolete preference. When calling this function, |lock_| | 93 // value to the obsolete preference. When calling this function, |lock_| |
| 94 // should not be held, since this function will send out notifications of | 94 // should not be held, since this function will send out notifications of |
| 95 // preference changes. | 95 // preference changes. |
| 96 void UpdatePref( | 96 void UpdatePref( |
| 97 const ContentSettingsPattern& primary_pattern, | 97 const ContentSettingsPattern& primary_pattern, |
| 98 const ContentSettingsPattern& secondary_pattern, | 98 const ContentSettingsPattern& secondary_pattern, |
| 99 const ResourceIdentifier& resource_identifier, | |
| 100 const base::Value* value); | 99 const base::Value* value); |
| 101 | 100 |
| 102 static void CanonicalizeContentSettingsExceptions( | 101 static void CanonicalizeContentSettingsExceptions( |
| 103 base::DictionaryValue* all_settings_dictionary); | 102 base::DictionaryValue* all_settings_dictionary); |
| 104 | 103 |
| 105 // In the debug mode, asserts that |lock_| is not held by this thread. It's | 104 // In the debug mode, asserts that |lock_| is not held by this thread. It's |
| 106 // ok if some other thread holds |lock_|, as long as it will eventually | 105 // ok if some other thread holds |lock_|, as long as it will eventually |
| 107 // release it. | 106 // release it. |
| 108 void AssertLockNotHeld() const; | 107 void AssertLockNotHeld() const; |
| 109 | 108 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 135 mutable base::Lock lock_; | 134 mutable base::Lock lock_; |
| 136 | 135 |
| 137 base::ThreadChecker thread_checker_; | 136 base::ThreadChecker thread_checker_; |
| 138 | 137 |
| 139 DISALLOW_COPY_AND_ASSIGN(ContentSettingsPref); | 138 DISALLOW_COPY_AND_ASSIGN(ContentSettingsPref); |
| 140 }; | 139 }; |
| 141 | 140 |
| 142 } // namespace content_settings | 141 } // namespace content_settings |
| 143 | 142 |
| 144 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_PREF_H_ | 143 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_PREF_H_ |
| OLD | NEW |