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

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

Issue 10412061: Fix crashes in DownloadRequestLimiter when extension popups/bubbles initiate downloads automatically (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 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
« no previous file with comments | « no previous file | chrome/browser/download/download_request_limiter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_browsertest.cc
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 097c951b66db48f33eee8a9bbf0ae493a55a5d15..25c86e86205f03d04aa8338000010acb63a95746 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -961,13 +961,10 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadResourceThrottleCancels) {
EXPECT_TRUE(EnsureNoPendingDownloads());
// Disable downloads for the tab.
- content::NavigationController* controller =
- &browser()->GetSelectedWebContents()->GetController();
+ WebContents* web_contents = browser()->GetSelectedWebContents();
DownloadRequestLimiter::TabDownloadState* tab_download_state =
g_browser_process->download_request_limiter()->GetDownloadState(
- controller,
- controller,
- true);
+ web_contents, web_contents, true);
ASSERT_TRUE(tab_download_state);
tab_download_state->set_download_status(
DownloadRequestLimiter::DOWNLOADS_NOT_ALLOWED);
@@ -975,7 +972,8 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadResourceThrottleCancels) {
// Try to start the download via Javascript and wait for the corresponding
// load stop event.
TestNavigationObserver observer(
- content::Source<content::NavigationController>(controller),
+ content::Source<content::NavigationController>(
+ &web_contents->GetController()),
NULL,
1);
bool download_assempted;
« no previous file with comments | « no previous file | chrome/browser/download/download_request_limiter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698