Index: chrome/browser/download/download_safe_browsing_client.cc |
diff --git a/chrome/browser/download/download_safe_browsing_client.cc b/chrome/browser/download/download_safe_browsing_client.cc |
index 36cf5fb28b436efe9b2337180cdb37a428380c31..1acc45c4322847125d1bc3ae3bdbc0bca1d30daa 100644 |
--- a/chrome/browser/download/download_safe_browsing_client.cc |
+++ b/chrome/browser/download/download_safe_browsing_client.cc |
@@ -10,8 +10,8 @@ |
#include "base/metrics/histogram.h" |
#include "base/metrics/stats_counters.h" |
#include "chrome/browser/browser_process.h" |
+#include "chrome/browser/download/download_create_info.h" |
#include "chrome/browser/download/download_manager.h" |
-#include "chrome/browser/history/download_create_info.h" |
#include "chrome/browser/safe_browsing/safe_browsing_util.h" |
#include "chrome/common/chrome_switches.h" |
#include "content/browser/browser_thread.h" |
@@ -23,8 +23,7 @@ |
DownloadSBClient::DownloadSBClient(int32 download_id, |
const std::vector<GURL>& url_chain, |
const GURL& referrer_url) |
- : info_(NULL), |
- download_id_(download_id), |
+ : download_id_(download_id), |
url_chain_(url_chain), |
referrer_url_(referrer_url) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
@@ -36,22 +35,19 @@ DownloadSBClient::DownloadSBClient(int32 download_id, |
DownloadSBClient::~DownloadSBClient() {} |
-void DownloadSBClient::CheckDownloadUrl(DownloadCreateInfo* info, |
- UrlDoneCallback* callback) { |
+void DownloadSBClient::CheckDownloadUrl(UrlDoneCallback* callback) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
// It is not allowed to call this method twice. |
CHECK(!url_done_callback_.get() && !hash_done_callback_.get()); |
CHECK(callback); |
- CHECK(info); |
- info_ = info; |
start_time_ = base::TimeTicks::Now(); |
url_done_callback_.reset(callback); |
BrowserThread::PostTask( |
BrowserThread::IO, FROM_HERE, |
NewRunnableMethod(this, |
&DownloadSBClient::CheckDownloadUrlOnIOThread, |
- info->url_chain)); |
+ url_chain_)); |
} |
void DownloadSBClient::CheckDownloadHash(const std::string& hash, |
@@ -125,7 +121,7 @@ void DownloadSBClient::SafeBrowsingCheckUrlDone( |
DVLOG(1) << "SafeBrowsingCheckUrlDone with result: " << result; |
bool is_dangerous = result != SafeBrowsingService::SAFE; |
- url_done_callback_->Run(info_, is_dangerous); |
+ url_done_callback_->Run(download_id_, is_dangerous); |
if (sb_service_.get() && sb_service_->download_protection_enabled()) { |
UMA_HISTOGRAM_TIMES("SB2.DownloadUrlCheckDuration", |