| 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();
|
|
|