| 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 41140017c8296b67a335abf993525c1db7eb4e2c..0c0166a1a5848c0b682bf540226a5decf1380ccb 100644
|
| --- a/chrome/browser/automation/testing_automation_provider.cc
|
| +++ b/chrome/browser/automation/testing_automation_provider.cc
|
| @@ -2646,7 +2646,8 @@ void TestingAutomationProvider::GetDownloadsInfo(Browser* browser,
|
| for (std::vector<DownloadItem*>::iterator it = downloads.begin();
|
| it != downloads.end();
|
| it++) { // Fill info about each download item.
|
| - list_of_downloads->Append(GetDictionaryFromDownloadItem(*it));
|
| + list_of_downloads->Append(GetDictionaryFromDownloadItem(
|
| + *it, browser->profile()->IsOffTheRecord()));
|
| }
|
| }
|
| return_value->Set("downloads", list_of_downloads);
|
| @@ -2741,7 +2742,7 @@ void TestingAutomationProvider::PerformActionOnDownload(
|
| if (action == "open") {
|
| selected_item->AddObserver(
|
| new AutomationProviderDownloadUpdatedObserver(
|
| - this, reply_message, true));
|
| + this, reply_message, true, browser->profile()->IsOffTheRecord()));
|
| selected_item->OpenDownload();
|
| } else if (action == "toggle_open_files_like_this") {
|
| DownloadPrefs* prefs =
|
| @@ -2764,16 +2765,16 @@ void TestingAutomationProvider::PerformActionOnDownload(
|
| selected_item->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD);
|
| } else if (action == "save_dangerous_download") {
|
| selected_item->AddObserver(new AutomationProviderDownloadUpdatedObserver(
|
| - this, reply_message, false));
|
| + this, reply_message, false, browser->profile()->IsOffTheRecord()));
|
| selected_item->DangerousDownloadValidated();
|
| } else if (action == "toggle_pause") {
|
| selected_item->AddObserver(new AutomationProviderDownloadUpdatedObserver(
|
| - this, reply_message, false));
|
| + this, reply_message, false, browser->profile()->IsOffTheRecord()));
|
| // This will still return if download has already completed.
|
| selected_item->TogglePause();
|
| } else if (action == "cancel") {
|
| selected_item->AddObserver(new AutomationProviderDownloadUpdatedObserver(
|
| - this, reply_message, false));
|
| + this, reply_message, false, browser->profile()->IsOffTheRecord()));
|
| selected_item->Cancel(true);
|
| } else {
|
| AutomationJSONReply(this, reply_message)
|
|
|