| Index: chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
|
| diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
|
| index c64051c808ef98c0c64b046574872f9625663c70..c7c8218560a6618a85f2ccb7e9790778e84889a1 100644
|
| --- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
|
| +++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
|
| @@ -21,7 +21,7 @@
|
| #include "chrome/browser/ui/app_list/arc/arc_package_syncable_service.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "chrome/grit/generated_resources.h"
|
| -#include "components/arc/arc_bridge_service.h"
|
| +#include "components/arc/arc_service_manager.h"
|
| #include "components/crx_file/id_util.h"
|
| #include "components/pref_registry/pref_registry_syncable.h"
|
| #include "components/prefs/scoped_user_pref_update.h"
|
| @@ -255,16 +255,12 @@ ArcAppListPrefs::ArcAppListPrefs(
|
| }
|
|
|
| ArcAppListPrefs::~ArcAppListPrefs() {
|
| - // A reference to ArcBridgeService is kept here so that it would crash the
|
| - // tests where ArcBridgeService and ArcAppListPrefs are not destroyed in right
|
| - // order.
|
| - arc::ArcBridgeService* bridge_service = arc::ArcBridgeService::Get();
|
| - if (bridge_service)
|
| - app_instance_holder_->RemoveObserver(this);
|
| -
|
| arc::ArcSessionManager* arc_session_manager = arc::ArcSessionManager::Get();
|
| - if (arc_session_manager)
|
| - arc_session_manager->RemoveObserver(this);
|
| + if (!arc_session_manager)
|
| + return;
|
| + DCHECK(arc::ArcServiceManager::Get());
|
| + arc_session_manager->RemoveObserver(this);
|
| + app_instance_holder_->RemoveObserver(this);
|
| }
|
|
|
| void ArcAppListPrefs::StartPrefs() {
|
|
|