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

Unified Diff: chrome/browser/download/download_util.cc

Issue 8468020: Propagate the SafeBrowsing download protection verdict to the DownloadItem. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge Created 9 years, 1 month 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/download/download_util.cc
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index e5639601ae799a6547d7d898546b7bccf0b3b599..737b829de006e9d6acad8d5d5f9aa1d79ddb6c2c 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -35,6 +35,7 @@
#include "content/browser/download/download_file.h"
#include "content/browser/download/download_item.h"
#include "content/browser/download/download_manager.h"
+#include "content/browser/download/download_state_info.h"
#include "content/browser/download/download_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
@@ -427,10 +428,10 @@ DictionaryValue* CreateDownloadItemValue(DownloadItem* download, int id) {
if (download->IsInProgress()) {
if (download->safety_state() == DownloadItem::DANGEROUS) {
file_value->SetString("state", "DANGEROUS");
- DCHECK(download->GetDangerType() == DownloadItem::DANGEROUS_FILE ||
- download->GetDangerType() == DownloadItem::DANGEROUS_URL);
+ DCHECK(download->GetDangerType() == DownloadStateInfo::DANGEROUS_FILE ||
+ download->GetDangerType() == DownloadStateInfo::DANGEROUS_URL);
const char* danger_type_value =
- download->GetDangerType() == DownloadItem::DANGEROUS_FILE ?
+ download->GetDangerType() == DownloadStateInfo::DANGEROUS_FILE ?
"DANGEROUS_FILE" : "DANGEROUS_URL";
file_value->SetString("danger_type", danger_type_value);
} else if (download->is_paused()) {

Powered by Google App Engine
This is Rietveld 408576698