Lines Matching refs:download

13 #include "chrome/browser/download/download_file.h"
14 #include "chrome/browser/download/download_file_manager.h"
15 #include "chrome/browser/download/download_item.h"
16 #include "chrome/browser/download/download_manager.h"
17 #include "chrome/browser/download/download_prefs.h"
18 #include "chrome/browser/download/download_status_updater.h"
19 #include "chrome/browser/download/download_util.h"
20 #include "chrome/browser/download/mock_download_manager.h"
72 // Get the download item with ID |id|.
96 // Make sure download item |id| was set with correct safety state for
172 // Safe download, download finishes BEFORE file name determined.
177 // Dangerous download (file is dangerous or download URL is not safe or both),
178 // download finishes BEFORE file name determined. Needs to be renamed only
186 // Safe download, download finishes AFTER file name determined.
190 // Dangerous download, download finishes AFTER file name determined.
221 // This is an observer that records what download IDs have opened a select
274 virtual void OnDownloadUpdated(DownloadItem* download) {
275 DCHECK_EQ(tracked_, download);
276 states_hit_ |= (1 << download->state());
279 virtual void OnDownloadOpened(DownloadItem* download) {
280 DCHECK_EQ(tracked_, download);
281 states_hit_ |= (1 << download->state());
424 DownloadItem* download = GetActiveDownloadItem(0);
425 ASSERT_TRUE(download != NULL);
427 EXPECT_EQ(DownloadItem::IN_PROGRESS, download->state());
428 scoped_ptr<ItemObserver> observer(new ItemObserver(download));
441 EXPECT_EQ(DownloadItem::INTERRUPTED, download->state());
450 download->Cancel(true);
452 EXPECT_EQ(DownloadItem::INTERRUPTED, download->state());
490 DownloadItem* download = GetActiveDownloadItem(0);
491 ASSERT_TRUE(download != NULL);
493 EXPECT_EQ(DownloadItem::IN_PROGRESS, download->state());
494 scoped_ptr<ItemObserver> observer(new ItemObserver(download));
503 download->Cancel(false);
557 DownloadItem* download = GetActiveDownloadItem(0);
558 ASSERT_TRUE(download != NULL);
560 EXPECT_EQ(DownloadItem::IN_PROGRESS, download->state());
561 scoped_ptr<ItemObserver> observer(new ItemObserver(download));
563 // Create and initialize the download file. We're bypassing the first part
564 // of the download process and skipping to the part after the final file
565 // name has been chosen, so we need to initialize the download file
582 // Finish the download.
595 EXPECT_EQ(DownloadItem::COMPLETE, download->state());