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 29ea238304a548ee5a82ee17c6af2e0bd62bf3de..f3cd0c08c40388cd5fbef474a8460df339920336 100644 |
| --- a/chrome/browser/automation/testing_automation_provider.cc |
| +++ b/chrome/browser/automation/testing_automation_provider.cc |
| @@ -2657,7 +2657,7 @@ void TestingAutomationProvider::PerformActionOnDownload( |
| } |
| // We need to be IN_PROGRESS for these actions. |
| - if ((action == "toggle_pause" || action == "cancel") && |
| + if ((action == "pause" || action == "resume" || action == "cancel") && |
| !selected_item->IsInProgress()) { |
| AutomationJSONReply(this, reply_message) |
| .SendError("Selected DownloadItem is not in progress."); |
| @@ -2689,11 +2689,16 @@ void TestingAutomationProvider::PerformActionOnDownload( |
| selected_item->AddObserver(new AutomationProviderDownloadUpdatedObserver( |
| this, reply_message, false, browser->profile()->IsOffTheRecord())); |
| selected_item->DangerousDownloadValidated(); |
| - } else if (action == "toggle_pause") { |
| + } else if (action == "pause") { |
| selected_item->AddObserver(new AutomationProviderDownloadUpdatedObserver( |
| this, reply_message, false, browser->profile()->IsOffTheRecord())); |
| // This will still return if download has already completed. |
| - selected_item->TogglePause(); |
| + selected_item->Pause(); |
| + } else if (action == "resume") { |
| + selected_item->AddObserver(new AutomationProviderDownloadUpdatedObserver( |
| + this, reply_message, false, browser->profile()->IsOffTheRecord())); |
| + // This will still return if download has already completed. |
|
asanka
2013/01/02 16:44:50
I'm not very familiar with the automation interfac
Randy Smith (Not in Mondays)
2013/01/02 20:16:02
You are quite correct. I had originally thought t
|
| + selected_item->Resume(); |
| } else if (action == "cancel") { |
| selected_item->AddObserver(new AutomationProviderDownloadUpdatedObserver( |
| this, reply_message, false, browser->profile()->IsOffTheRecord())); |