Fix global ProfileObservers shutdown flow.

This commit is contained in:
Aleksey Khoroshilov
2022-11-02 21:46:51 +07:00
parent c7b620705c
commit ff7648b691
3 changed files with 18 additions and 0 deletions
+9
View File
@@ -155,6 +155,15 @@ void BraveBrowserProcessImpl::Init() {
InitSystemRequestHandlerCallback();
}
#if !BUILDFLAG(IS_ANDROID)
void BraveBrowserProcessImpl::StartTearDown() {
ad_block_service_.reset();
brave_stats_updater_.reset();
brave_referrals_service_.reset();
BrowserProcessImpl::StartTearDown();
}
#endif
brave_component_updater::BraveComponent::Delegate*
BraveBrowserProcessImpl::brave_component_updater_delegate() {
if (!brave_component_updater_delegate_)
+3
View File
@@ -128,6 +128,9 @@ class BraveBrowserProcessImpl : public BraveBrowserProcess,
private:
// BrowserProcessImpl overrides:
void Init() override;
#if !BUILDFLAG(IS_ANDROID)
void StartTearDown() override;
#endif
void CreateProfileManager();
@@ -28,7 +28,13 @@
#include "services/network/public/mojom/network_service.mojom-forward.h"
#define Init virtual Init
#if !BUILDFLAG(IS_ANDROID)
#define StartTearDown virtual StartTearDown
#endif // !BUILDFLAG(IS_ANDROID)
#include "src/chrome/browser/browser_process_impl.h"
#if !BUILDFLAG(IS_ANDROID)
#undef StartTearDown
#endif // !BUILDFLAG(IS_ANDROID)
#undef Init
#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_