Commit afe61ce4 authored by Alexey Baskakov's avatar Alexey Baskakov Committed by Commit Bot

WebApp: Fix Reset for WebAppProvider if DesktopAppsWithoutExtensions enabled.

Make notification_registrar_ shared between old and new implementations.
No behaviour change - feature is hidden behind the flag.

Drive by: Remove unused header in bookmark_app_installation_task.cc

Bug: None
Change-Id: I4e1f735a60a2befe61f427741d3db820dd528091
Reviewed-on: https://chromium-review.googlesource.com/c/1370241Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
Commit-Queue: Alexey Baskakov <loyso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615718}
parent 8c304b51
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "chrome/browser/web_applications/components/web_app_constants.h" #include "chrome/browser/web_applications/components/web_app_constants.h"
#include "chrome/browser/web_applications/components/web_app_data_retriever.h" #include "chrome/browser/web_applications/components/web_app_data_retriever.h"
#include "chrome/browser/web_applications/extensions/bookmark_app_installer.h" #include "chrome/browser/web_applications/extensions/bookmark_app_installer.h"
#include "chrome/browser/web_applications/extensions/bookmark_app_tab_helper.h"
#include "chrome/common/web_application_info.h" #include "chrome/common/web_application_info.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "extensions/common/constants.h" #include "extensions/common/constants.h"
......
...@@ -55,6 +55,9 @@ WebAppProvider::WebAppProvider(Profile* profile) { ...@@ -55,6 +55,9 @@ WebAppProvider::WebAppProvider(Profile* profile) {
CreateWebAppsSubsystems(profile); CreateWebAppsSubsystems(profile);
else else
CreateBookmarkAppsSubsystems(profile); CreateBookmarkAppsSubsystems(profile);
notification_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
content::Source<Profile>(profile));
} }
WebAppProvider::~WebAppProvider() = default; WebAppProvider::~WebAppProvider() = default;
...@@ -91,9 +94,6 @@ void WebAppProvider::CreateBookmarkAppsSubsystems(Profile* profile) { ...@@ -91,9 +94,6 @@ void WebAppProvider::CreateBookmarkAppsSubsystems(Profile* profile) {
system_web_app_manager_ = std::make_unique<SystemWebAppManager>( system_web_app_manager_ = std::make_unique<SystemWebAppManager>(
profile, pending_app_manager_.get()); profile, pending_app_manager_.get());
notification_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
content::Source<Profile>(profile));
web_app::ScanForExternalWebApps( web_app::ScanForExternalWebApps(
profile, base::BindOnce(&WebAppProvider::OnScanForExternalWebApps, profile, base::BindOnce(&WebAppProvider::OnScanForExternalWebApps,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment