| Index: chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
|
| diff --git a/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
|
| index 1f0584864f38d36c75dd0efbb1c3327ddf4ce77c..82144b0df6994a53a13f15eb797733b9e04adecc 100644
|
| --- a/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
|
| +++ b/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
|
| @@ -153,6 +153,12 @@ class LastDownloadFinderTest : public testing::Test {
|
| return profile;
|
| }
|
|
|
| + safe_browsing::LastDownloadFinder::DownloadDetailsGetter
|
| + GetDownloadDetailsGetter() {
|
| + return base::Bind(&LastDownloadFinderTest::GetDownloadDetails,
|
| + base::Unretained(this));
|
| + }
|
| +
|
| void AddDownload(Profile* profile, const history::DownloadRow& download) {
|
| base::RunLoop run_loop;
|
|
|
| @@ -195,6 +201,7 @@ class LastDownloadFinderTest : public testing::Test {
|
|
|
| scoped_ptr<safe_browsing::LastDownloadFinder> finder(
|
| safe_browsing::LastDownloadFinder::Create(
|
| + GetDownloadDetailsGetter(),
|
| base::Bind(&LastDownloadFinderTest::OnLastDownload,
|
| base::Unretained(this),
|
| &last_download,
|
| @@ -255,6 +262,14 @@ class LastDownloadFinderTest : public testing::Test {
|
| // created.
|
| void OnDownloadCreated(bool created) { ASSERT_TRUE(created); }
|
|
|
| + void GetDownloadDetails(
|
| + content::BrowserContext* context,
|
| + const safe_browsing::DownloadMetadataManager::GetDownloadDetailsCallback&
|
| + callback) {
|
| + callback.Run(
|
| + scoped_ptr<safe_browsing::ClientIncidentReport_DownloadDetails>());
|
| + }
|
| +
|
| int profile_number_;
|
| };
|
|
|
| @@ -296,6 +311,7 @@ TEST_F(LastDownloadFinderTest, DeleteBeforeResults) {
|
|
|
| // Start a finder and kill it before the search completes.
|
| safe_browsing::LastDownloadFinder::Create(
|
| + GetDownloadDetailsGetter(),
|
| base::Bind(&LastDownloadFinderTest::NeverCalled, base::Unretained(this)))
|
| .reset();
|
|
|
| @@ -320,6 +336,7 @@ TEST_F(LastDownloadFinderTest, AddProfileAfterStarting) {
|
| // Create a finder that we expect will find a download in the second profile.
|
| scoped_ptr<safe_browsing::LastDownloadFinder> finder(
|
| safe_browsing::LastDownloadFinder::Create(
|
| + GetDownloadDetailsGetter(),
|
| base::Bind(&LastDownloadFinderTest::OnLastDownload,
|
| base::Unretained(this),
|
| &last_download,
|
|
|