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

Unified Diff: chrome/browser/storage_monitor/storage_monitor.cc

Issue 14556015: [Media Galleries] Lazily initialize the storage monitor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Switch approaches Created 7 years, 7 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/storage_monitor/storage_monitor.cc
diff --git a/chrome/browser/storage_monitor/storage_monitor.cc b/chrome/browser/storage_monitor/storage_monitor.cc
index 2e4e42484dd9905f5cb89704657e03ac4b41c6eb..18ca9a42e05b57cc7e37e71e94fd5acb91e84711 100644
--- a/chrome/browser/storage_monitor/storage_monitor.cc
+++ b/chrome/browser/storage_monitor/storage_monitor.cc
@@ -8,6 +8,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/storage_monitor/removable_storage_observer.h"
#include "chrome/browser/storage_monitor/transient_device_ids.h"
+#include "content/public/browser/browser_thread.h"
namespace chrome {
@@ -62,6 +63,8 @@ std::vector<StorageInfo> StorageMonitor::GetAttachedStorage() const {
}
void StorageMonitor::Initialize(base::Closure callback) {
+ //DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+
if (initialized_) {
if (!callback.is_null())
callback.Run();
@@ -130,6 +133,8 @@ StorageMonitor::Receiver* StorageMonitor::receiver() const {
}
void StorageMonitor::MarkInitialized() {
+ //DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+
initialized_ = true;
for (std::vector<base::Closure>::iterator iter =
on_initialize_callbacks_.begin();

Powered by Google App Engine
This is Rietveld 408576698