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/extensions/file_manager/event_router.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
Index: chrome/browser/chromeos/extensions/file_manager/event_router.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.cc b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
index fe12c7bc18667d6e31f32679552819b7d5d7a3e4..7ce2f1c684b42546122400926e87b083df0a7219 100644
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
@@ -412,8 +412,10 @@ void EventRouter::OnIntentFiltersUpdated() {
void EventRouter::Shutdown() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (arc::ArcServiceManager::IsInitialized())
- arc::ArcServiceManager::Get()->RemoveObserver(this);
+ auto* intent_helper =
+ arc::ArcServiceManager::GetGlobalService<arc::ArcIntentHelperBridge>();
+ if (intent_helper)
+ intent_helper->RemoveObserver(this);
chromeos::system::TimezoneSettings::GetInstance()->RemoveObserver(this);
@@ -506,8 +508,12 @@ void EventRouter::ObserveEvents() {
chromeos::system::TimezoneSettings::GetInstance()->AddObserver(this);
- if (arc::ArcSessionManager::IsAllowedForProfile(profile_))
- arc::ArcServiceManager::Get()->AddObserver(this);
+ if (arc::ArcSessionManager::IsAllowedForProfile(profile_)) {
+ auto* intent_helper =
+ arc::ArcServiceManager::GetGlobalService<arc::ArcIntentHelperBridge>();
+ if (intent_helper)
+ intent_helper->AddObserver(this);
+ }
}
// File watch setup routines.
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/event_router.h ('k') | chrome/browser/chromeos/note_taking_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698