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

Unified Diff: components/arc/arc_service_manager.cc

Issue 2623273003: arc: Remove ArcServiceManager::Observer (Closed)
Patch Set: Moved Get() to the manager class per (verbal) feedback from Luis 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
« no previous file with comments | « components/arc/arc_service_manager.h ('k') | components/arc/arc_service_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_service_manager.cc
diff --git a/components/arc/arc_service_manager.cc b/components/arc/arc_service_manager.cc
index f2a81d15a796a3c3f10274d3f6e87d792f7dea17..00177619c7cc4331d6c573e75782643fa0e69047 100644
--- a/components/arc/arc_service_manager.cc
+++ b/components/arc/arc_service_manager.cc
@@ -20,33 +20,9 @@ ArcServiceManager* g_arc_service_manager = nullptr;
} // namespace
-class ArcServiceManager::IntentHelperObserverImpl
- : public ArcIntentHelperObserver {
- public:
- explicit IntentHelperObserverImpl(ArcServiceManager* manager);
- ~IntentHelperObserverImpl() override = default;
-
- private:
- void OnIntentFiltersUpdated() override;
- ArcServiceManager* const manager_;
-
- DISALLOW_COPY_AND_ASSIGN(IntentHelperObserverImpl);
-};
-
-ArcServiceManager::IntentHelperObserverImpl::IntentHelperObserverImpl(
- ArcServiceManager* manager)
- : manager_(manager) {}
-
-void ArcServiceManager::IntentHelperObserverImpl::OnIntentFiltersUpdated() {
- DCHECK(manager_->thread_checker_.CalledOnValidThread());
- for (auto& observer : manager_->observer_list_)
- observer.OnIntentFiltersUpdated();
-}
-
ArcServiceManager::ArcServiceManager(
scoped_refptr<base::TaskRunner> blocking_task_runner)
: blocking_task_runner_(blocking_task_runner),
- intent_helper_observer_(base::MakeUnique<IntentHelperObserverImpl>(this)),
arc_bridge_service_(base::MakeUnique<ArcBridgeService>()),
icon_loader_(new ActivityIconLoader()),
activity_resolver_(new LocalActivityResolver()) {
@@ -68,14 +44,6 @@ ArcServiceManager* ArcServiceManager::Get() {
return g_arc_service_manager;
}
-// static
-bool ArcServiceManager::IsInitialized() {
- if (!g_arc_service_manager)
- return false;
- DCHECK(g_arc_service_manager->thread_checker_.CalledOnValidThread());
- return true;
-}
-
ArcBridgeService* ArcServiceManager::arc_bridge_service() {
DCHECK(thread_checker_.CalledOnValidThread());
return arc_bridge_service_.get();
@@ -109,16 +77,6 @@ ArcService* ArcServiceManager::GetNamedServiceInternal(
return service->second.get();
}
-void ArcServiceManager::AddObserver(Observer* observer) {
- DCHECK(thread_checker_.CalledOnValidThread());
- observer_list_.AddObserver(observer);
-}
-
-void ArcServiceManager::RemoveObserver(Observer* observer) {
- DCHECK(thread_checker_.CalledOnValidThread());
- observer_list_.RemoveObserver(observer);
-}
-
void ArcServiceManager::Shutdown() {
DCHECK(thread_checker_.CalledOnValidThread());
icon_loader_ = nullptr;
« no previous file with comments | « components/arc/arc_service_manager.h ('k') | components/arc/arc_service_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698