Chromium Code Reviews| 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 4b2f0aa4d28366d49d885f02c791fc23f8dd3cec..f7279804812c999d5c36b7aadb22b0b4cd806746 100644 |
| --- a/chrome/browser/automation/testing_automation_provider.cc |
| +++ b/chrome/browser/automation/testing_automation_provider.cc |
| @@ -4,6 +4,10 @@ |
| #include "chrome/browser/automation/testing_automation_provider.h" |
| +#include <map> |
| +#include <string> |
| +#include <vector> |
| + |
| #include "app/message_box_flags.h" |
| #include "base/command_line.h" |
| #include "base/json/json_reader.h" |
| @@ -2591,7 +2595,7 @@ DownloadItem* GetDownloadItemFromId(int id, DownloadManager* download_manager) { |
| return selected_item; |
| } |
| -} // namespace |
| +} // namespace |
| // See PerformActionOnDownload() in chrome/test/pyautolib/pyauto.py for sample |
| // json input and output. |
| @@ -2980,7 +2984,7 @@ void TestingAutomationProvider::GetPluginsInfo( |
| item->SetString("path", it->path.value()); |
| item->SetString("version", it->version); |
| item->SetString("desc", it->desc); |
| - item->SetBoolean("enabled", it->enabled); |
| + item->SetBoolean("enabled", webkit::npapi::IsPluginEnabled(*it)); |
| // Add info about mime types. |
| ListValue* mime_types = new ListValue(); |
| for (std::vector<webkit::npapi::WebPluginMimeType>::const_iterator type_it = |
| @@ -3018,12 +3022,13 @@ void TestingAutomationProvider::EnablePlugin(Browser* browser, |
| DictionaryValue* args, |
| IPC::Message* reply_message) { |
| FilePath::StringType path; |
| + string16 name; |
|
jam
2011/01/19 20:22:09
nit: here and below, looks like name is unused?
pastarmovj
2011/01/19 23:39:17
Done. Undone small changes to following lines that
|
| AutomationJSONReply reply(this, reply_message); |
| if (!args->GetString("path", &path)) { |
| - reply.SendError("path not specified."); |
| + reply.SendError("path or name not specified."); |
| return; |
| } else if (!webkit::npapi::PluginList::Singleton()->EnablePlugin( |
| - FilePath(path))) { |
| + FilePath(path))) { |
| reply.SendError(StringPrintf("Could not enable plugin for path %s.", |
| path.c_str())); |
| return; |
| @@ -3038,12 +3043,13 @@ void TestingAutomationProvider::DisablePlugin(Browser* browser, |
| DictionaryValue* args, |
| IPC::Message* reply_message) { |
| FilePath::StringType path; |
| + string16 name; |
| AutomationJSONReply reply(this, reply_message); |
| if (!args->GetString("path", &path)) { |
| - reply.SendError("path not specified."); |
| + reply.SendError("path or name not specified."); |
| return; |
| } else if (!webkit::npapi::PluginList::Singleton()->DisablePlugin( |
| - FilePath(path))) { |
| + FilePath(path))) { |
| reply.SendError(StringPrintf("Could not disable plugin for path %s.", |
| path.c_str())); |
| return; |
| @@ -3198,7 +3204,7 @@ webkit_glue::PasswordForm GetPasswordFormFromDict( |
| return password_form; |
| } |
| -} // namespace |
| +} // namespace |
| // See AddSavedPassword() in chrome/test/functional/pyauto.py for sample json |
| // input. |