OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PLUGINS_PLUGIN_PREFS_H_ | 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_ |
6 #define CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_ | 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 15 matching lines...) Expand all Loading... |
26 namespace webkit { | 26 namespace webkit { |
27 struct WebPluginInfo; | 27 struct WebPluginInfo; |
28 namespace npapi { | 28 namespace npapi { |
29 class PluginList; | 29 class PluginList; |
30 } | 30 } |
31 } | 31 } |
32 | 32 |
33 // This class stores information about whether a plug-in or a plug-in group is | 33 // This class stores information about whether a plug-in or a plug-in group is |
34 // enabled or disabled. | 34 // enabled or disabled. |
35 // Except where otherwise noted, it can be used on every thread. | 35 // Except where otherwise noted, it can be used on every thread. |
36 class PluginPrefs : public RefcountedProfileKeyedService { | 36 class PluginPrefs : public RefcountedBrowserContextKeyedService { |
37 public: | 37 public: |
38 enum PolicyStatus { | 38 enum PolicyStatus { |
39 NO_POLICY = 0, // Neither enabled or disabled by policy. | 39 NO_POLICY = 0, // Neither enabled or disabled by policy. |
40 POLICY_ENABLED, | 40 POLICY_ENABLED, |
41 POLICY_DISABLED, | 41 POLICY_DISABLED, |
42 }; | 42 }; |
43 | 43 |
44 // Returns the instance associated with |profile|, creating it if necessary. | 44 // Returns the instance associated with |profile|, creating it if necessary. |
45 static scoped_refptr<PluginPrefs> GetForProfile(Profile* profile); | 45 static scoped_refptr<PluginPrefs> GetForProfile(Profile* profile); |
46 | 46 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 // PluginList to use for testing. If this is NULL, defaults to the global | 170 // PluginList to use for testing. If this is NULL, defaults to the global |
171 // singleton. | 171 // singleton. |
172 webkit::npapi::PluginList* plugin_list_; | 172 webkit::npapi::PluginList* plugin_list_; |
173 | 173 |
174 PrefChangeRegistrar registrar_; | 174 PrefChangeRegistrar registrar_; |
175 | 175 |
176 DISALLOW_COPY_AND_ASSIGN(PluginPrefs); | 176 DISALLOW_COPY_AND_ASSIGN(PluginPrefs); |
177 }; | 177 }; |
178 | 178 |
179 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_ | 179 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_ |
OLD | NEW |