Chromium Code Reviews| Index: chrome/browser/plugin_prefs.h |
| diff --git a/chrome/browser/plugin_prefs.h b/chrome/browser/plugin_prefs.h |
| index eddb0250f3a120aaa234aa65cf9e9c663e8b4d06..15350a0c40f36de2bb3e95a7928eaf2269a2b85e 100644 |
| --- a/chrome/browser/plugin_prefs.h |
| +++ b/chrome/browser/plugin_prefs.h |
| @@ -13,6 +13,7 @@ |
| #include "base/file_path.h" |
| #include "base/synchronization/lock.h" |
| #include "chrome/browser/api/prefs/pref_change_registrar.h" |
| +#include "chrome/browser/plugin_finder.h" |
| #include "chrome/browser/prefs/pref_service.h" |
| #include "chrome/browser/profiles/refcounted_profile_keyed_service.h" |
| #include "content/public/browser/notification_observer.h" |
| @@ -65,9 +66,10 @@ class PluginPrefs : public RefcountedProfileKeyedService, |
| // Enable or disable a plugin group. |
| void EnablePluginGroup(bool enable, const string16& group_name); |
| - // Returns true if the plug-in state can be enabled or disabled according to |
| - // |enable|, false if the plug-in state cannot be changed because of a policy. |
| - bool CanEnablePlugin(bool enable, const FilePath& file_path); |
| + // Checks if the plug-in state can be enabled or disabled according to |
| + // |enable| or if the plug-in state cannot be changed because of a policy. |
| + void CanEnablePlugin(bool enable, const FilePath& file_path, |
|
Bernhard Bauer
2012/08/24 08:15:34
I think we could combine these methods. There are
ibraaaa
2012/08/24 15:51:29
I wanted to leave this in another CL with modifyin
|
| + const base::Callback<void(bool)>& cb); |
| // Enables or disables a specific plugin file, and calls |callback| |
| // afterwards. |
| @@ -150,6 +152,12 @@ class PluginPrefs : public RefcountedProfileKeyedService, |
| static bool IsStringMatchedInSet(const string16& name, |
| const std::set<string16>& pattern_set); |
| + // Callback method called by 'CanEnablePlugin' method. |
| + // It performs the actual logic to check if a plug-in can be enabled. |
| + void CanEnablePluginCallback(bool enabled, const FilePath& path, |
| + const base::Callback<void(bool)>& cb, |
| + PluginFinder* finder); |
| + |
| // Guards access to the following data structures. |
| mutable base::Lock lock_; |