Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: components/arc/intent_helper/link_handler_model_impl.h

Issue 2655233007: Get rid of RefCounted for ActivityIconLoader. (Closed)
Patch Set: address comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/arc/intent_helper/link_handler_model_impl.h
diff --git a/components/arc/intent_helper/link_handler_model_impl.h b/components/arc/intent_helper/link_handler_model_impl.h
index 06d4803103531b3e1e40d9c2ad8c83e04264f461..c6613b4df6b4f44e0316f5b7dae7e16dde05d973 100644
--- a/components/arc/intent_helper/link_handler_model_impl.h
+++ b/components/arc/intent_helper/link_handler_model_impl.h
@@ -9,18 +9,17 @@
#include <vector>
#include "ash/link_handler_model.h"
-#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
-#include "components/arc/arc_service.h"
#include "components/arc/common/intent_helper.mojom.h"
-#include "components/arc/intent_helper/activity_icon_loader.h"
+#include "components/arc/intent_helper/arc_intent_helper_bridge.h"
+#include "url/gurl.h"
namespace arc {
class LinkHandlerModelImpl : public ash::LinkHandlerModel {
public:
- explicit LinkHandlerModelImpl(scoped_refptr<ActivityIconLoader> icon_loader);
+ LinkHandlerModelImpl();
~LinkHandlerModelImpl() override;
// ash::LinkHandlerModel overrides:
@@ -38,7 +37,7 @@ class LinkHandlerModelImpl : public ash::LinkHandlerModel {
mojom::IntentHelperInstance* GetIntentHelper();
void OnUrlHandlerList(std::vector<mojom::IntentHandlerInfoPtr> handlers);
void NotifyObserver(
- std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons);
+ std::unique_ptr<ArcIntentHelperBridge::ActivityToIconsMap> icons);
// Checks if the |url| matches the following pattern:
// "http(s)://<valid_google_hostname>/url?...&url=<valid_url>&..."
@@ -51,11 +50,7 @@ class LinkHandlerModelImpl : public ash::LinkHandlerModel {
// Url handler info passed from ARC.
std::vector<mojom::IntentHandlerInfoPtr> handlers_;
// Activity icon info passed from ARC.
- ActivityIconLoader::ActivityToIconsMap icons_;
-
- // Use refptr to retain the object even if ArcIntentHelperBridge is destructed
- // first.
- scoped_refptr<ActivityIconLoader> icon_loader_;
+ ArcIntentHelperBridge::ActivityToIconsMap icons_;
// Always keep this the last member of this class to make sure it's the
// first thing to be destructed.

Powered by Google App Engine
This is Rietveld 408576698