Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 7848025: Store plug-in enabled/disabled state in PluginPrefs instead of WebPluginInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: indent Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698