| 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 4758ec80170b4a7663cf75c499eac8f2a50dd017..3a15a29591f762185ee6a73d210bc39bdc8b6170 100644
|
| --- a/chrome/browser/automation/testing_automation_provider.cc
|
| +++ b/chrome/browser/automation/testing_automation_provider.cc
|
| @@ -2723,7 +2723,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);
|
| @@ -2818,7 +2819,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 =
|
| @@ -2841,16 +2842,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)
|
|
|