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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc

Issue 1781983002: [Downloads] Introduce GUIDs for downloads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 9 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/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 9f79cf295908f43f0a949e3a16ff645dd459f16d..d22edd58b727670f443287f35606e597f687d7f3 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
@@ -13,6 +13,7 @@
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
+#include "base/guid.h"
#include "base/location.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/field_trial.h"
@@ -265,9 +266,11 @@ class LastDownloadFinderTest : public testing::Test {
const base::FilePath::CharType* file_path) {
base::Time now(base::Time::Now());
return history::DownloadRow(
- base::FilePath(file_path), base::FilePath(file_path),
+ base::FilePath(file_path),
+ base::FilePath(file_path),
std::vector<GURL>(1, GURL("http://www.google.com")), // url_chain
GURL(), // referrer
+ std::string(), // HTTP method
"application/octet-stream", // mime_type
"application/octet-stream", // original_mime_type
now - base::TimeDelta::FromMinutes(10), // start
@@ -280,10 +283,12 @@ class LastDownloadFinderTest : public testing::Test {
history::DownloadDangerType::NOT_DANGEROUS, // danger_type
history::ToHistoryDownloadInterruptReason(
content::DOWNLOAD_INTERRUPT_REASON_NONE), // interrupt_reason,
+ std::string(), // hash
download_id_++, // id
- false, // download_opened
- std::string(), // ext_id
- std::string()); // ext_name
+ base::GenerateGUID(),
+ false, // download_opened
+ std::string(), // ext_id
+ std::string()); // ext_name
}
content::TestBrowserThreadBundle browser_thread_bundle_;

Powered by Google App Engine
This is Rietveld 408576698