summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugin_prefs.h
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-27 02:34:25 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-27 02:34:25 +0000
commit672b2c6ff842345b062d2227584d955ab74b5c8d (patch)
tree0f511be9090f23b28fca98e1d0a19f114a926d2b /chrome/browser/plugin_prefs.h
parentdfce80004a4c06798e509e87258a511e33710860 (diff)
downloadchromium_src-672b2c6ff842345b062d2227584d955ab74b5c8d.zip
chromium_src-672b2c6ff842345b062d2227584d955ab74b5c8d.tar.gz
chromium_src-672b2c6ff842345b062d2227584d955ab74b5c8d.tar.bz2
Return success value from PluginPrefs::EnablePlugin.
BUG=97179 TEST=chrome/test/functional/enterprise.py Review URL: http://codereview.chromium.org/7976005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102863 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_prefs.h')
-rw-r--r--chrome/browser/plugin_prefs.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/chrome/browser/plugin_prefs.h b/chrome/browser/plugin_prefs.h
index ecfd585..9201dbf 100644
--- a/chrome/browser/plugin_prefs.h
+++ b/chrome/browser/plugin_prefs.h
@@ -34,6 +34,7 @@ namespace webkit {
struct WebPluginInfo;
namespace npapi {
class PluginGroup;
+class PluginList;
}
}
@@ -61,6 +62,9 @@ class PluginPrefs : public base::RefCountedThreadSafe<PluginPrefs>,
// created PluginPrefs object.
static PluginPrefs* GetForTestingProfile(Profile* profile);
+ // Sets the plug-in list for tests.
+ void SetPluginListForTesting(webkit::npapi::PluginList* plugin_list);
+
// Creates a new instance. This method should only be used for testing.
PluginPrefs();
@@ -77,12 +81,12 @@ class PluginPrefs : public base::RefCountedThreadSafe<PluginPrefs>,
void EnablePluginGroup(bool enable, const string16& group_name);
// Enable or disable a specific plugin file.
- void EnablePlugin(bool enable, const FilePath& file_path);
+ bool EnablePlugin(bool enable, const FilePath& file_path);
// Enable or disable a plug-in in all profiles. This sets a default for
// profiles which are created later as well.
// This method should only be called on the UI thread.
- static void EnablePluginGlobally(bool enable, const FilePath& file_path);
+ static bool EnablePluginGlobally(bool enable, const FilePath& file_path);
// Returns whether there is a policy enabling or disabling plug-ins of the
// given name.
@@ -114,6 +118,9 @@ class PluginPrefs : public base::RefCountedThreadSafe<PluginPrefs>,
const std::set<string16>& disabled_exception_patterns,
const std::set<string16>& enabled_patterns);
+ // Returns the plugin list to use, either the singleton or the override.
+ webkit::npapi::PluginList* GetPluginList();
+
// Called on the file thread to get the data necessary to update the saved
// preferences.
void GetPreferencesDataOnFileThread();
@@ -144,6 +151,10 @@ class PluginPrefs : public base::RefCountedThreadSafe<PluginPrefs>,
// Weak pointer, owned by the profile (which owns us).
PrefService* prefs_;
+ // PluginList to use for testing. If this is NULL, defaults to the global
+ // singleton.
+ webkit::npapi::PluginList* plugin_list_;
+
PrefChangeRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(PluginPrefs);