summaryrefslogtreecommitdiffstats
path: root/content/shell/shell_browser_context.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-06 14:55:57 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-06 14:55:57 +0000
commitb441a849460cc2fca0ce9a18fe8e255cadc0656c (patch)
tree83610aa4039deac864b88cbc1c3df02b92e004f0 /content/shell/shell_browser_context.cc
parent7a2dbfbf3cfea03bca0cfa79c639e0683dc11569 (diff)
downloadchromium_src-b441a849460cc2fca0ce9a18fe8e255cadc0656c.zip
chromium_src-b441a849460cc2fca0ce9a18fe8e255cadc0656c.tar.gz
chromium_src-b441a849460cc2fca0ce9a18fe8e255cadc0656c.tar.bz2
Move creation and ownership of DownloadManager from the embedder to content. This matches all the other objects that content depends on.
In a followup change, I'll make content support NULL DownloadManagerDelegates to match the rest of the delegate interfaces. BUG=98716 Review URL: https://chromiumcodereview.appspot.com/10535026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/shell_browser_context.cc')
-rw-r--r--content/shell/shell_browser_context.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/content/shell/shell_browser_context.cc b/content/shell/shell_browser_context.cc
index 678edfc..92f618b 100644
--- a/content/shell/shell_browser_context.cc
+++ b/content/shell/shell_browser_context.cc
@@ -126,15 +126,9 @@ bool ShellBrowserContext::IsOffTheRecord() const {
return false;
}
-DownloadManager* ShellBrowserContext::GetDownloadManager() {
- if (!download_manager_.get()) {
- download_manager_delegate_ = new ShellDownloadManagerDelegate();
- download_manager_ = DownloadManager::Create(download_manager_delegate_,
- NULL);
- download_manager_delegate_->SetDownloadManager(download_manager_.get());
- download_manager_->Init(this);
- }
- return download_manager_.get();
+DownloadManagerDelegate* ShellBrowserContext::GetDownloadManagerDelegate() {
+ download_manager_delegate_ = new ShellDownloadManagerDelegate();
+ return download_manager_delegate_.get();
}
net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() {