| Index: chrome/browser/profiles/off_the_record_profile_impl.cc
|
| diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
|
| index 964bc8b090308dc6bb802fac60a4fa48a403528d..0dba6ec17bb298e0d81170ff53fcae17b407c6dc 100644
|
| --- a/chrome/browser/profiles/off_the_record_profile_impl.cc
|
| +++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
|
| @@ -316,7 +316,10 @@ class OffTheRecordProfileImpl : public Profile,
|
|
|
| virtual DownloadManager* GetDownloadManager() {
|
| if (!download_manager_.get()) {
|
| - download_manager_delegate_ = new ChromeDownloadManagerDelegate(this);
|
| + // In case the delegate has already been set by
|
| + // SetDownloadManagerDelegate.
|
| + if (!download_manager_delegate_.get())
|
| + download_manager_delegate_ = new ChromeDownloadManagerDelegate(this);
|
| scoped_refptr<DownloadManager> dlm(
|
| new DownloadManager(download_manager_delegate_,
|
| g_browser_process->download_status_updater()));
|
| @@ -580,6 +583,11 @@ class OffTheRecordProfileImpl : public Profile,
|
| }
|
|
|
| private:
|
| + virtual void SetDownloadManagerDelegate(
|
| + ChromeDownloadManagerDelegate* delegate) {
|
| + download_manager_delegate_ = delegate;
|
| + }
|
| +
|
| void CreateQuotaManagerAndClients() {
|
| if (quota_manager_.get()) {
|
| DCHECK(file_system_context_.get());
|
|
|