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

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 spurious DCHECK. 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 2febbcb4451e67be9b125b18218d9a5eeab7e504..39b90c12a4ed53a38d9ad7bdd028c8592e90e1c8 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/download_prefs.h"
#include "chrome/browser/download/download_shelf.h"
-#include "chrome/browser/history/download_create_info.h"
+#include "chrome/browser/history/download_history_info.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/net/url_request_mock_http_job.h"
#include "chrome/browser/net/url_request_slow_download_job.h"
@@ -698,7 +698,7 @@ class DownloadsHistoryDataCollector {
ui_test_utils::RunMessageLoop();
}
- bool GetDownloadsHistoryEntry(DownloadCreateInfo* result) {
+ bool GetDownloadsHistoryEntry(DownloadHistoryInfo* result) {
DCHECK(result);
*result = result_;
return result_valid_;
@@ -706,9 +706,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;
@@ -718,7 +718,7 @@ class DownloadsHistoryDataCollector {
MessageLoopForUI::current()->Quit();
}
- DownloadCreateInfo result_;
+ DownloadHistoryInfo result_;
bool result_valid_;
int64 download_db_handle_;
CancelableRequestConsumer callback_consumer_;
@@ -1284,7 +1284,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());

Powered by Google App Engine
This is Rietveld 408576698