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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/event_router.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
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..b9ebc8dbe14d80ec1e9eb8212433ad6cadf34121 100644
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
@@ -401,8 +401,13 @@ EventRouter::EventRouter(Profile* profile)
EventRouter::~EventRouter() = default;
+void EventRouter::OnArcShutdown() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ arc::ArcServiceManager::Get()->RemoveObserver(this);
+}
+
void EventRouter::OnIntentFiltersUpdated() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
BroadcastEvent(profile_,
extensions::events::FILE_MANAGER_PRIVATE_ON_APPS_UPDATED,
file_manager_private::OnAppsUpdated::kEventName,
@@ -412,9 +417,6 @@ void EventRouter::OnIntentFiltersUpdated() {
void EventRouter::Shutdown() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (arc::ArcServiceManager::IsInitialized())
- arc::ArcServiceManager::Get()->RemoveObserver(this);
-
chromeos::system::TimezoneSettings::GetInstance()->RemoveObserver(this);
DLOG_IF(WARNING, !file_watchers_.empty())
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/event_router.h ('k') | components/arc/arc_service_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698