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

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

Issue 10805020: Kill DownloadItem::IsOtr() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 8 years, 4 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 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)

Powered by Google App Engine
This is Rietveld 408576698