Chromium Code Reviews| 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..0c5926a5ef4574fdda008c705a885d07f40f7969 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()) |
|
Yusuke Sato
2017/01/11 23:12:37
kinaba: I've removed IsInitialized() from the mana
|
| - arc::ArcServiceManager::Get()->RemoveObserver(this); |
| + auto* intent_helper = |
| + arc::ArcIntentHelperBridge::Get(arc::ArcServiceManager::Get()); |
| + 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::ArcIntentHelperBridge::Get(arc::ArcServiceManager::Get()); |
| + if (intent_helper) |
| + intent_helper->AddObserver(this); |
| + } |
| } |
| // File watch setup routines. |