| Index: components/arc/intent_helper/link_handler_model_impl.cc
|
| diff --git a/components/arc/intent_helper/link_handler_model_impl.cc b/components/arc/intent_helper/link_handler_model_impl.cc
|
| index 19485e179ffcf22ad22dc6a749b21fe923c4227b..0844af9eb24f4174e9679cd0ac9ad9e5a71f3340 100644
|
| --- a/components/arc/intent_helper/link_handler_model_impl.cc
|
| +++ b/components/arc/intent_helper/link_handler_model_impl.cc
|
| @@ -12,7 +12,6 @@
|
| #include "components/arc/arc_service_manager.h"
|
| #include "components/arc/intent_helper/arc_intent_helper_bridge.h"
|
| #include "components/google/core/browser/google_util.h"
|
| -#include "url/gurl.h"
|
| #include "url/url_util.h"
|
|
|
| namespace arc {
|
| @@ -48,11 +47,9 @@ bool GetQueryValue(const GURL& url,
|
|
|
| } // namespace
|
|
|
| -LinkHandlerModelImpl::LinkHandlerModelImpl(
|
| - scoped_refptr<ActivityIconLoader> icon_loader)
|
| - : icon_loader_(icon_loader), weak_ptr_factory_(this) {}
|
| +LinkHandlerModelImpl::LinkHandlerModelImpl() : weak_ptr_factory_(this) {}
|
|
|
| -LinkHandlerModelImpl::~LinkHandlerModelImpl() {}
|
| +LinkHandlerModelImpl::~LinkHandlerModelImpl() = default;
|
|
|
| bool LinkHandlerModelImpl::Init(const GURL& url) {
|
| auto* arc_service_manager = ArcServiceManager::Get();
|
| @@ -99,15 +96,18 @@ void LinkHandlerModelImpl::OnUrlHandlerList(
|
| handlers_ = ArcIntentHelperBridge::FilterOutIntentHelper(std::move(handlers));
|
|
|
| bool icon_info_notified = false;
|
| - if (icon_loader_) {
|
| + auto* intent_helper_bridge =
|
| + ArcServiceManager::GetGlobalService<ArcIntentHelperBridge>();
|
| + if (intent_helper_bridge) {
|
| std::vector<ActivityIconLoader::ActivityName> activities;
|
| for (size_t i = 0; i < handlers_.size(); ++i) {
|
| activities.emplace_back(handlers_[i]->package_name,
|
| handlers_[i]->activity_name);
|
| }
|
| - const ActivityIconLoader::GetResult result = icon_loader_->GetActivityIcons(
|
| - activities, base::Bind(&LinkHandlerModelImpl::NotifyObserver,
|
| - weak_ptr_factory_.GetWeakPtr()));
|
| + const ActivityIconLoader::GetResult result =
|
| + intent_helper_bridge->icon_loader()->GetActivityIcons(
|
| + activities, base::Bind(&LinkHandlerModelImpl::NotifyObserver,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| icon_info_notified = ActivityIconLoader::HasIconsReadyCallbackRun(result);
|
| }
|
|
|
|
|