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

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 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)

Powered by Google App Engine
This is Rietveld 408576698