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_DEFAULT_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DEFAULT_PROVIDER_H_ |
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DEFAULT_PROVIDER_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DEFAULT_PROVIDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 20 matching lines...) Expand all Loading... |
31 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 31 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
32 | 32 |
33 DefaultProvider(PrefService* prefs, | 33 DefaultProvider(PrefService* prefs, |
34 bool incognito); | 34 bool incognito); |
35 virtual ~DefaultProvider(); | 35 virtual ~DefaultProvider(); |
36 | 36 |
37 // ProviderInterface implementations. | 37 // ProviderInterface implementations. |
38 virtual RuleIterator* GetRuleIterator( | 38 virtual RuleIterator* GetRuleIterator( |
39 ContentSettingsType content_type, | 39 ContentSettingsType content_type, |
40 const ResourceIdentifier& resource_identifier, | 40 const ResourceIdentifier& resource_identifier, |
41 bool incognito) const OVERRIDE; | 41 bool incognito) const override; |
42 | 42 |
43 virtual bool SetWebsiteSetting( | 43 virtual bool SetWebsiteSetting( |
44 const ContentSettingsPattern& primary_pattern, | 44 const ContentSettingsPattern& primary_pattern, |
45 const ContentSettingsPattern& secondary_pattern, | 45 const ContentSettingsPattern& secondary_pattern, |
46 ContentSettingsType content_type, | 46 ContentSettingsType content_type, |
47 const ResourceIdentifier& resource_identifier, | 47 const ResourceIdentifier& resource_identifier, |
48 base::Value* value) OVERRIDE; | 48 base::Value* value) override; |
49 | 49 |
50 virtual void ClearAllContentSettingsRules( | 50 virtual void ClearAllContentSettingsRules( |
51 ContentSettingsType content_type) OVERRIDE; | 51 ContentSettingsType content_type) override; |
52 | 52 |
53 virtual void ShutdownOnUIThread() OVERRIDE; | 53 virtual void ShutdownOnUIThread() override; |
54 | 54 |
55 private: | 55 private: |
56 // Sets the fields of |settings| based on the values in |dictionary|. | 56 // Sets the fields of |settings| based on the values in |dictionary|. |
57 void GetSettingsFromDictionary(const base::DictionaryValue* dictionary); | 57 void GetSettingsFromDictionary(const base::DictionaryValue* dictionary); |
58 | 58 |
59 // Forces the default settings to be explicitly set instead of themselves | 59 // Forces the default settings to be explicitly set instead of themselves |
60 // being CONTENT_SETTING_DEFAULT. | 60 // being CONTENT_SETTING_DEFAULT. |
61 void ForceDefaultsToBeExplicit(); | 61 void ForceDefaultsToBeExplicit(); |
62 | 62 |
63 // Reads the default settings from the preferences service. If |overwrite| is | 63 // Reads the default settings from the preferences service. If |overwrite| is |
(...skipping 22 matching lines...) Expand all Loading... |
86 // Whether we are currently updating preferences, this is used to ignore | 86 // Whether we are currently updating preferences, this is used to ignore |
87 // notifications from the preferences service that we triggered ourself. | 87 // notifications from the preferences service that we triggered ourself. |
88 bool updating_preferences_; | 88 bool updating_preferences_; |
89 | 89 |
90 DISALLOW_COPY_AND_ASSIGN(DefaultProvider); | 90 DISALLOW_COPY_AND_ASSIGN(DefaultProvider); |
91 }; | 91 }; |
92 | 92 |
93 } // namespace content_settings | 93 } // namespace content_settings |
94 | 94 |
95 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DEFAULT_PROVIDER_H_ | 95 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DEFAULT_PROVIDER_H_ |
OLD | NEW |