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

Unified Diff: chrome/browser/automation/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/automation_provider.cc
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 31acc47ea4993aa67972f55ffb700c2f36d5b804..dd9fd603ab7db383ec56f516fed28883148c3c3f 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -39,6 +39,8 @@
#include "chrome/browser/browsing_data/browsing_data_remover.h"
#include "chrome/browser/character_encoding.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
+#include "chrome/browser/download/download_service.h"
+#include "chrome/browser/download/download_service_factory.h"
asanka 2012/08/13 23:03:58 Nit: Are these needed?
benjhayden 2012/08/14 14:30:51 Done.
#include "chrome/browser/net/url_request_mock_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/printing/print_job.h"
@@ -300,7 +302,7 @@ int AutomationProvider::GetIndexForNavigationController(
// TODO(phajdan.jr): move to TestingAutomationProvider.
DictionaryValue* AutomationProvider::GetDictionaryFromDownloadItem(
- const DownloadItem* download) {
+ const DownloadItem* download, bool incognito) {
std::map<DownloadItem::DownloadState, std::string> state_to_string;
state_to_string[DownloadItem::IN_PROGRESS] = std::string("IN_PROGRESS");
state_to_string[DownloadItem::CANCELLED] = std::string("CANCELLED");
@@ -325,7 +327,7 @@ DictionaryValue* AutomationProvider::GetDictionaryFromDownloadItem(
dl_item_value->SetBoolean("open_when_complete",
download->GetOpenWhenComplete());
dl_item_value->SetBoolean("is_temporary", download->IsTemporary());
- dl_item_value->SetBoolean("is_otr", download->IsOtr()); // incognito
+ dl_item_value->SetBoolean("is_otr", incognito);
dl_item_value->SetString("state", state_to_string[download->GetState()]);
dl_item_value->SetString("safety_state",
safety_state_to_string[download->GetSafetyState()]);

Powered by Google App Engine
This is Rietveld 408576698