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

Unified Diff: chrome/browser/extensions/api/downloads/downloads_api_browsertest.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/extensions/api/downloads/downloads_api_browsertest.cc
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
index b0055284beb381b16bcab4e89c5511dfa598bfdb..0d57378182c7f1a4a63a8999e23f4f243fd7f973 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
@@ -12,6 +12,7 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/guid.h"
#include "base/json/json_reader.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
@@ -426,15 +427,21 @@ class DownloadExtensionTest : public ExtensionApiTest {
url_chain.push_back(GURL());
for (size_t i = 0; i < count; ++i) {
DownloadItem* item = GetOnRecordManager()->CreateDownloadItem(
+ base::GenerateGUID(),
content::DownloadItem::kInvalidId + 1 + i,
downloads_directory().Append(history_info[i].filename),
- downloads_directory().Append(history_info[i].filename), url_chain,
- GURL(), // URL Chain, referrer
- std::string(), std::string(), // mime_type, original_mime_type
- current, current, // start_time, end_time
- std::string(), std::string(), // etag, last_modified
- 1, 1, // received_bytes, total_bytes
- history_info[i].state, // state
+ downloads_directory().Append(history_info[i].filename),
+ url_chain,
+ GURL(), // URL Chain, referrer
+ std::string(),
+ std::string(), // mime_type, original_mime_type
+ current,
+ current, // start_time, end_time
+ std::string(),
+ std::string(), // etag, last_modified
+ 1,
+ 1, // received_bytes, total_bytes
+ history_info[i].state, // state
history_info[i].danger_type,
(history_info[i].state != content::DownloadItem::CANCELLED
? content::DOWNLOAD_INTERRUPT_REASON_NONE

Powered by Google App Engine
This is Rietveld 408576698