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

Unified Diff: chrome/browser/chromeos/arc/arc_service_launcher.cc

Issue 2538263005: Simplify ArcServiceManager by stop deriving it from ArcIntentHelperObserver (Closed)
Patch Set: review Created 4 years 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
« no previous file with comments | « no previous file | components/arc/arc_service_manager.h » ('j') | components/arc/arc_service_manager.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_service_launcher.cc
diff --git a/chrome/browser/chromeos/arc/arc_service_launcher.cc b/chrome/browser/chromeos/arc/arc_service_launcher.cc
index af50b1aefb23c3b74277b7d3b4c1ce583a3f6c7d..a6e99cf408543cf34bd86528d0086c5f8a83aff3 100644
--- a/chrome/browser/chromeos/arc/arc_service_launcher.cc
+++ b/chrome/browser/chromeos/arc/arc_service_launcher.cc
@@ -102,9 +102,10 @@ void ArcServiceLauncher::Initialize() {
auto intent_helper = base::MakeUnique<ArcIntentHelperBridge>(
arc_bridge_service, arc_service_manager_->icon_loader(),
arc_service_manager_->activity_resolver());
- // We don't have to remove observer since
- // ArcServiceManager always outlives ArcIntentHelperBridge.
- intent_helper->AddObserver(arc_service_manager_.get());
+ // We don't have to call ArcIntentHelperBridge::RemoveObserver() in
+ // ~ArcServiceManager() since the observer in ArcServiceManager always
+ // outlives the ArcIntentHelperBridge object.
+ intent_helper->AddObserver(arc_service_manager_->intent_helper_observer());
arc_service_manager_->AddService(std::move(intent_helper));
arc_service_manager_->AddService(
base::MakeUnique<ArcImeService>(arc_bridge_service));
« no previous file with comments | « no previous file | components/arc/arc_service_manager.h » ('j') | components/arc/arc_service_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698