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

Unified Diff: chrome/browser/media_galleries/gallery_watch_manager.cc

Issue 2654303002: Always call StorageMonitor::RemoveObserver in ~MediaFileSystemRegistry. (Closed)
Patch Set: add include 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 | « no previous file | chrome/browser/media_galleries/gallery_watch_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media_galleries/gallery_watch_manager.cc
diff --git a/chrome/browser/media_galleries/gallery_watch_manager.cc b/chrome/browser/media_galleries/gallery_watch_manager.cc
index 76b0d3c16ab0d77b1e73d0a8b06ebf8c5b74d4db..de4ece789194aa4a579a906a8ffc16773508ddfd 100644
--- a/chrome/browser/media_galleries/gallery_watch_manager.cc
+++ b/chrome/browser/media_galleries/gallery_watch_manager.cc
@@ -9,6 +9,7 @@
#include <tuple>
#include "base/bind.h"
+#include "base/logging.h"
#include "base/macros.h"
#include "base/stl_util.h"
#include "base/time/time.h"
@@ -183,8 +184,8 @@ GalleryWatchManager::GalleryWatchManager()
GalleryWatchManager::~GalleryWatchManager() {
weak_factory_.InvalidateWeakPtrs();
- if (storage_monitor_observed_ &&
- storage_monitor::StorageMonitor::GetInstance()) {
+ if (storage_monitor_observed_) {
+ DCHECK(storage_monitor::StorageMonitor::GetInstance());
storage_monitor::StorageMonitor::GetInstance()->RemoveObserver(this);
}
« no previous file with comments | « no previous file | chrome/browser/media_galleries/gallery_watch_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698