Index: chrome/browser/automation/testing_automation_provider.cc |
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc |
index 509f3680e15f7c30efdce0da06c08d732c081624..4943f1c7c02e34d681391ad0c62333ced1b683d3 100644 |
--- a/chrome/browser/automation/testing_automation_provider.cc |
+++ b/chrome/browser/automation/testing_automation_provider.cc |
@@ -3527,12 +3527,9 @@ void TestingAutomationProvider::EnablePlugin(Browser* browser, |
if (!args->GetString("path", &path)) { |
reply.SendError("path not specified."); |
return; |
- } else if (!webkit::npapi::PluginList::Singleton()->EnablePlugin( |
- FilePath(path))) { |
- reply.SendError(StringPrintf("Could not enable plugin for path %s.", |
- path.c_str())); |
- return; |
} |
+ PluginPrefs::GetForProfile(browser->profile())->EnablePlugin( |
+ true, FilePath(path)); |
reply.SendSuccess(NULL); |
} |
@@ -3547,12 +3544,9 @@ void TestingAutomationProvider::DisablePlugin(Browser* browser, |
if (!args->GetString("path", &path)) { |
reply.SendError("path not specified."); |
return; |
- } else if (!webkit::npapi::PluginList::Singleton()->DisablePlugin( |
- FilePath(path))) { |
- reply.SendError(StringPrintf("Could not disable plugin for path %s.", |
- path.c_str())); |
- return; |
} |
+ PluginPrefs::GetForProfile(browser->profile())->EnablePlugin( |
+ false, FilePath(path)); |
reply.SendSuccess(NULL); |
} |