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

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

Issue 2538263005: Simplify ArcServiceManager by stop deriving it from ArcIntentHelperObserver (Closed)
Patch Set: Address comment 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') | no next file with comments »
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 be75eba071bbd0699ed6eb3f7dafd153bf91976e..891dc842eb7d46136c14b0a1fba8043119edc0a7 100644
--- a/chrome/browser/chromeos/arc/arc_service_launcher.cc
+++ b/chrome/browser/chromeos/arc/arc_service_launcher.cc
@@ -101,9 +101,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698