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

Unified Diff: components/arc/arc_service_manager.cc

Issue 2581953002: Introduce ArcServiceManager::OnShutdown(). (Closed)
Patch Set: Address comments. 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 | « components/arc/arc_service_manager.h ('k') | no next file » | 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 e07cb955cb15b4f47a685a5d17cbaae369807d81..dc8aec789b5e93e7b19bb76b8e6902f633de3bca 100644
--- a/components/arc/arc_service_manager.cc
+++ b/components/arc/arc_service_manager.cc
@@ -83,14 +83,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();
@@ -113,6 +105,11 @@ void ArcServiceManager::RemoveObserver(Observer* observer) {
void ArcServiceManager::Shutdown() {
DCHECK(thread_checker_.CalledOnValidThread());
+
+ // Before actual shutdown, notify observers for clean up.
+ for (auto& observer : observer_list_)
+ observer.OnArcShutdown();
+
icon_loader_ = nullptr;
activity_resolver_ = nullptr;
services_.clear();
« no previous file with comments | « components/arc/arc_service_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698