Remove DownloadManagerDelegate

Having a partial implemented DownloadManagerDelegate will cause crashes under
certain places.
This commit is contained in:
Cheng Zhao 2014-12-17 13:13:19 -08:00
parent 779c44424f
commit dc86ab58a9
5 changed files with 4 additions and 42 deletions

View file

@ -48,8 +48,6 @@
'browser/devtools_embedder_message_dispatcher.h',
'browser/devtools_ui.cc',
'browser/devtools_ui.h',
'browser/download_manager_delegate.cc',
'browser/download_manager_delegate.h',
'browser/inspectable_web_contents.cc',
'browser/inspectable_web_contents.h',
'browser/inspectable_web_contents_delegate.cc',

View file

@ -4,7 +4,6 @@
#include "browser/browser_context.h"
#include "browser/download_manager_delegate.h"
#include "browser/inspectable_web_contents_impl.h"
#include "browser/network_delegate.h"
#include "common/application_info.h"
@ -145,21 +144,19 @@ content::ResourceContext* BrowserContext::GetResourceContext() {
}
content::DownloadManagerDelegate* BrowserContext::GetDownloadManagerDelegate() {
if (!download_manager_delegate_)
download_manager_delegate_.reset(new DownloadManagerDelegate);
return download_manager_delegate_.get();
return nullptr;
}
content::BrowserPluginGuestManager* BrowserContext::GetGuestManager() {
return NULL;
return nullptr;
}
storage::SpecialStoragePolicy* BrowserContext::GetSpecialStoragePolicy() {
return NULL;
return nullptr;
}
content::PushMessagingService* BrowserContext::GetPushMessagingService() {
return NULL;
return nullptr;
}
content::SSLHostStateDelegate* BrowserContext::GetSSLHostStateDelegate() {

View file

@ -14,8 +14,6 @@ class PrefService;
namespace brightray {
class DownloadManagerDelegate;
class BrowserContext : public content::BrowserContext,
public brightray::URLRequestContextGetter::Delegate {
public:
@ -68,7 +66,6 @@ class BrowserContext : public content::BrowserContext,
scoped_ptr<ResourceContext> resource_context_;
scoped_refptr<URLRequestContextGetter> url_request_getter_;
scoped_ptr<PrefService> prefs_;
scoped_ptr<DownloadManagerDelegate> download_manager_delegate_;
DISALLOW_COPY_AND_ASSIGN(BrowserContext);
};

View file

@ -1,11 +0,0 @@
#include "browser/download_manager_delegate.h"
namespace brightray {
DownloadManagerDelegate::DownloadManagerDelegate() {
}
DownloadManagerDelegate::~DownloadManagerDelegate() {
}
}

View file

@ -1,19 +0,0 @@
#ifndef BRIGHTRAY_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
#define BRIGHTRAY_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
#include "content/public/browser/download_manager_delegate.h"
namespace brightray {
class DownloadManagerDelegate : public content::DownloadManagerDelegate {
public:
DownloadManagerDelegate();
~DownloadManagerDelegate();
private:
DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegate);
};
} // namespace brightray
#endif