Remove DownloadManagerDelegate
Having a partial implemented DownloadManagerDelegate will cause crashes under certain places.
This commit is contained in:
parent
779c44424f
commit
dc86ab58a9
5 changed files with 4 additions and 42 deletions
|
@ -48,8 +48,6 @@
|
||||||
'browser/devtools_embedder_message_dispatcher.h',
|
'browser/devtools_embedder_message_dispatcher.h',
|
||||||
'browser/devtools_ui.cc',
|
'browser/devtools_ui.cc',
|
||||||
'browser/devtools_ui.h',
|
'browser/devtools_ui.h',
|
||||||
'browser/download_manager_delegate.cc',
|
|
||||||
'browser/download_manager_delegate.h',
|
|
||||||
'browser/inspectable_web_contents.cc',
|
'browser/inspectable_web_contents.cc',
|
||||||
'browser/inspectable_web_contents.h',
|
'browser/inspectable_web_contents.h',
|
||||||
'browser/inspectable_web_contents_delegate.cc',
|
'browser/inspectable_web_contents_delegate.cc',
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
#include "browser/browser_context.h"
|
#include "browser/browser_context.h"
|
||||||
|
|
||||||
#include "browser/download_manager_delegate.h"
|
|
||||||
#include "browser/inspectable_web_contents_impl.h"
|
#include "browser/inspectable_web_contents_impl.h"
|
||||||
#include "browser/network_delegate.h"
|
#include "browser/network_delegate.h"
|
||||||
#include "common/application_info.h"
|
#include "common/application_info.h"
|
||||||
|
@ -145,21 +144,19 @@ content::ResourceContext* BrowserContext::GetResourceContext() {
|
||||||
}
|
}
|
||||||
|
|
||||||
content::DownloadManagerDelegate* BrowserContext::GetDownloadManagerDelegate() {
|
content::DownloadManagerDelegate* BrowserContext::GetDownloadManagerDelegate() {
|
||||||
if (!download_manager_delegate_)
|
return nullptr;
|
||||||
download_manager_delegate_.reset(new DownloadManagerDelegate);
|
|
||||||
return download_manager_delegate_.get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
content::BrowserPluginGuestManager* BrowserContext::GetGuestManager() {
|
content::BrowserPluginGuestManager* BrowserContext::GetGuestManager() {
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
storage::SpecialStoragePolicy* BrowserContext::GetSpecialStoragePolicy() {
|
storage::SpecialStoragePolicy* BrowserContext::GetSpecialStoragePolicy() {
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
content::PushMessagingService* BrowserContext::GetPushMessagingService() {
|
content::PushMessagingService* BrowserContext::GetPushMessagingService() {
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
content::SSLHostStateDelegate* BrowserContext::GetSSLHostStateDelegate() {
|
content::SSLHostStateDelegate* BrowserContext::GetSSLHostStateDelegate() {
|
||||||
|
|
|
@ -14,8 +14,6 @@ class PrefService;
|
||||||
|
|
||||||
namespace brightray {
|
namespace brightray {
|
||||||
|
|
||||||
class DownloadManagerDelegate;
|
|
||||||
|
|
||||||
class BrowserContext : public content::BrowserContext,
|
class BrowserContext : public content::BrowserContext,
|
||||||
public brightray::URLRequestContextGetter::Delegate {
|
public brightray::URLRequestContextGetter::Delegate {
|
||||||
public:
|
public:
|
||||||
|
@ -68,7 +66,6 @@ class BrowserContext : public content::BrowserContext,
|
||||||
scoped_ptr<ResourceContext> resource_context_;
|
scoped_ptr<ResourceContext> resource_context_;
|
||||||
scoped_refptr<URLRequestContextGetter> url_request_getter_;
|
scoped_refptr<URLRequestContextGetter> url_request_getter_;
|
||||||
scoped_ptr<PrefService> prefs_;
|
scoped_ptr<PrefService> prefs_;
|
||||||
scoped_ptr<DownloadManagerDelegate> download_manager_delegate_;
|
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(BrowserContext);
|
DISALLOW_COPY_AND_ASSIGN(BrowserContext);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
#include "browser/download_manager_delegate.h"
|
|
||||||
|
|
||||||
namespace brightray {
|
|
||||||
|
|
||||||
DownloadManagerDelegate::DownloadManagerDelegate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
DownloadManagerDelegate::~DownloadManagerDelegate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -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
|
|
Loading…
Reference in a new issue