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

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

Issue 6969009: Reduced the lifetime of DownloadCreateInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed structure accessors from DownloadItem, per request. Created 9 years, 7 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/download/download_browsertest.cc
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 6ccedb7cb6e968694b05e495f543622151634f35..9a55bc3ec299d9c97db9bb5021ad8aa510943a54 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -707,7 +707,7 @@ class DownloadsHistoryDataCollector {
ui_test_utils::RunMessageLoop();
}
- bool GetDownloadsHistoryEntry(DownloadCreateInfo* result) {
+ bool GetDownloadsHistoryEntry(DownloadHistoryInfo* result) {
DCHECK(result);
*result = result_;
return result_valid_;
@@ -715,9 +715,9 @@ class DownloadsHistoryDataCollector {
private:
void OnQueryDownloadsComplete(
- std::vector<DownloadCreateInfo>* entries) {
+ std::vector<DownloadHistoryInfo>* entries) {
result_valid_ = false;
- for (std::vector<DownloadCreateInfo>::const_iterator it = entries->begin();
+ for (std::vector<DownloadHistoryInfo>::const_iterator it = entries->begin();
it != entries->end(); ++it) {
if (it->db_handle == download_db_handle_) {
result_ = *it;
@@ -727,7 +727,7 @@ class DownloadsHistoryDataCollector {
MessageLoopForUI::current()->Quit();
}
- DownloadCreateInfo result_;
+ DownloadHistoryInfo result_;
bool result_valid_;
int64 download_db_handle_;
CancelableRequestConsumer callback_consumer_;
@@ -1309,7 +1309,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadHistoryCheck) {
DownloadsHistoryDataCollector history_collector(
db_handle,
browser()->profile()->GetDownloadManager());
- DownloadCreateInfo info;
+ DownloadHistoryInfo info;
EXPECT_TRUE(history_collector.GetDownloadsHistoryEntry(&info)) << db_handle;
EXPECT_EQ(file, info.path.BaseName());
EXPECT_EQ(url, info.url());
« no previous file with comments | « no previous file | chrome/browser/download/download_file_manager.cc » ('j') | chrome/browser/history/download_create_info.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698