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

Unified Diff: content/browser/renderer_host/resource_dispatcher_host_browsertest.cc

Issue 10535026: Move creation and ownership of DownloadManager from the embedder to content. This matches all the o… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros compile Created 8 years, 6 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: content/browser/renderer_host/resource_dispatcher_host_browsertest.cc
===================================================================
--- content/browser/renderer_host/resource_dispatcher_host_browsertest.cc (revision 140592)
+++ content/browser/renderer_host/resource_dispatcher_host_browsertest.cc (working copy)
@@ -25,6 +25,7 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
+using content::BrowserContext;
using content::BrowserThread;
using content::DownloadManager;
@@ -190,7 +191,7 @@
IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest,
SniffNoContentTypeNoData) {
// Make sure no downloads start.
- GetBrowserContext()->GetDownloadManager()->AddObserver(this);
+ BrowserContext::GetDownloadManager(GetBrowserContext())->AddObserver(this);
CheckTitleTest(GetMockURL("content-sniffer-test3.html"),
"Content Sniffer Test 3", 1);
EXPECT_EQ(1, browser()->tab_count());
@@ -248,7 +249,7 @@
IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest,
SyncXMLHttpRequest_DuringUnload) {
ASSERT_TRUE(test_server()->Start());
- GetBrowserContext()->GetDownloadManager()->AddObserver(this);
+ BrowserContext::GetDownloadManager(GetBrowserContext())->AddObserver(this);
CheckTitleTest(
test_server()->GetURL("files/sync_xmlhttprequest_during_unload.html"),

Powered by Google App Engine
This is Rietveld 408576698