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

Side by Side Diff: chrome/browser/download/download_browsertest.cc

Issue 7749013: Made the cancel from CancelDownloadOnRename go through the full cancel path, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Got rid of unnecessary local variable. Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/download/download_file_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 } 576 }
577 577
578 // Create a DownloadsObserver that will wait for the 578 // Create a DownloadsObserver that will wait for the
579 // specified number of downloads to finish. 579 // specified number of downloads to finish.
580 DownloadsObserver* CreateWaiter(Browser* browser, int num_downloads) { 580 DownloadsObserver* CreateWaiter(Browser* browser, int num_downloads) {
581 DownloadManager* download_manager = 581 DownloadManager* download_manager =
582 browser->profile()->GetDownloadManager(); 582 browser->profile()->GetDownloadManager();
583 return new DownloadsObserver( 583 return new DownloadsObserver(
584 download_manager, num_downloads, 584 download_manager, num_downloads,
585 DownloadItem::COMPLETE, // Really done 585 DownloadItem::COMPLETE, // Really done
586 false, // Bail on select file 586 true, // Bail on select file
587 ON_DANGEROUS_DOWNLOAD_FAIL); 587 ON_DANGEROUS_DOWNLOAD_FAIL);
588 } 588 }
589 589
590 // Create a DownloadsObserver that will wait for the 590 // Create a DownloadsObserver that will wait for the
591 // specified number of downloads to start. 591 // specified number of downloads to start.
592 DownloadsObserver* CreateInProgressWaiter(Browser* browser, 592 DownloadsObserver* CreateInProgressWaiter(Browser* browser,
593 int num_downloads) { 593 int num_downloads) {
594 DownloadManager* download_manager = 594 DownloadManager* download_manager =
595 browser->profile()->GetDownloadManager(); 595 browser->profile()->GetDownloadManager();
596 return new DownloadsObserver( 596 return new DownloadsObserver(
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 EXPECT_EQ(1u, observer->NumDangerousDownloadsSeen()); 1730 EXPECT_EQ(1u, observer->NumDangerousDownloadsSeen());
1731 1731
1732 // Download shelf should close. Download panel stays open on ChromeOS. 1732 // Download shelf should close. Download panel stays open on ChromeOS.
1733 CheckDownloadUI(browser(), false, true, FilePath()); 1733 CheckDownloadUI(browser(), false, true, FilePath());
1734 1734
1735 // Check that the extension was installed. 1735 // Check that the extension was installed.
1736 ExtensionService* extension_service = 1736 ExtensionService* extension_service =
1737 browser()->profile()->GetExtensionService(); 1737 browser()->profile()->GetExtensionService();
1738 ASSERT_TRUE(extension_service->GetExtensionById(kLargeThemeCrxId, false)); 1738 ASSERT_TRUE(extension_service->GetExtensionById(kLargeThemeCrxId, false));
1739 } 1739 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/download_file_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698