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 682264223c40b147f4446a65e51ef9b9b042da53..11f59f72bca6e06c1f82b57853d9a88c37454e3b 100644 |
--- a/chrome/browser/storage_monitor/storage_monitor.cc |
+++ b/chrome/browser/storage_monitor/storage_monitor.cc |
@@ -62,6 +62,11 @@ std::vector<StorageInfo> StorageMonitor::GetAttachedStorage() const { |
} |
void StorageMonitor::Initialize(base::Closure callback) { |
Hongbo Min
2013/05/29 06:53:00
What is the Initialize used for?
If the StorageMo
Greg Billock
2013/05/29 17:46:34
If your code needs an initialized storage monitor,
|
+ RegisterInitCompletedCallback(callback); |
+ Init(); |
+} |
+ |
+void StorageMonitor::RegisterInitCompletedCallback(base::Closure callback) { |
if (initialized_) { |
if (!callback.is_null()) |
callback.Run(); |
@@ -71,8 +76,6 @@ void StorageMonitor::Initialize(base::Closure callback) { |
if (!callback.is_null()) { |
on_initialize_callbacks_.push_back(callback); |
} |
- |
- Init(); |
} |
bool StorageMonitor::IsInitialized() { |