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

Unified Diff: chrome/browser/ui/browser_close_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: chrome/browser/ui/browser_close_browsertest.cc
===================================================================
--- chrome/browser/ui/browser_close_browsertest.cc (revision 140592)
+++ chrome/browser/ui/browser_close_browsertest.cc (working copy)
@@ -25,6 +25,7 @@
#include "content/public/common/page_transition_types.h"
#include "content/test/net/url_request_slow_download_job.h"
+using content::BrowserContext;
using content::BrowserThread;
using content::DownloadItem;
using content::DownloadManager;
@@ -112,7 +113,7 @@
// Setup an observer waiting for the given number of downloads
// to get to IN_PROGRESS.
DownloadManager* download_manager =
- browser->profile()->GetDownloadManager();
+ BrowserContext::GetDownloadManager(browser->profile());
scoped_ptr<DownloadTestObserver> observer(
new DownloadTestObserverInProgress(download_manager,
num_downloads,
@@ -146,7 +147,7 @@
DownloadService* download_service =
DownloadServiceFactory::GetForProfile(*pit);
if (download_service->HasCreatedDownloadManager()) {
- DownloadManager *mgr = download_service->GetDownloadManager();
+ DownloadManager *mgr = BrowserContext::GetDownloadManager(*pit);
scoped_refptr<DownloadTestFlushObserver> observer(
new DownloadTestFlushObserver(mgr));
observer->WaitForFlush();
@@ -156,8 +157,8 @@
DownloadServiceFactory::GetForProfile(
(*pit)->GetOffTheRecordProfile());
if (incognito_download_service->HasCreatedDownloadManager()) {
- DownloadManager *mgr =
- incognito_download_service->GetDownloadManager();
+ DownloadManager *mgr = BrowserContext::GetDownloadManager(
+ (*pit)->GetOffTheRecordProfile());
scoped_refptr<DownloadTestFlushObserver> observer(
new DownloadTestFlushObserver(mgr));
observer->WaitForFlush();

Powered by Google App Engine
This is Rietveld 408576698