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

Unified Diff: chrome/browser/extensions/extension_storage_monitor.h

Issue 2923663002: ExtensionStorageMonitor: use smaller, self-registering StorageObservers (Closed)
Patch Set: Remove lame comment. Created 3 years, 6 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/extensions/extension_storage_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_storage_monitor.h
diff --git a/chrome/browser/extensions/extension_storage_monitor.h b/chrome/browser/extensions/extension_storage_monitor.h
index 8c59fd5bf8341b64d2990670e52752040b9a43f9..2e9cafb368e7e1d92fc18aeeb57b7a89341ff28a 100644
--- a/chrome/browser/extensions/extension_storage_monitor.h
+++ b/chrome/browser/extensions/extension_storage_monitor.h
@@ -32,7 +32,7 @@ namespace extensions {
class Extension;
class ExtensionPrefs;
class ExtensionRegistry;
-class StorageEventObserver;
+class ExtensionStorageMonitorIOHelper;
// ExtensionStorageMonitor monitors the storage usage of extensions and apps
// that are granted unlimited storage and displays notifications when high
@@ -139,8 +139,9 @@ class ExtensionStorageMonitor : public KeyedService,
extensions::ExtensionRegistryObserver>
extension_registry_observer_;
- // StorageEventObserver monitors storage for extensions on the IO thread.
- scoped_refptr<StorageEventObserver> storage_observer_;
+ // ExtensionStorageMonitorIOHelper maintains, on the IO thread, an instance of
+ // SingleExtensionStorageObserver for each extension.
+ scoped_refptr<ExtensionStorageMonitorIOHelper> io_helper_;
// Modal dialog used to confirm removal of an extension.
std::unique_ptr<ExtensionUninstallDialog> uninstall_dialog_;
@@ -151,7 +152,7 @@ class ExtensionStorageMonitor : public KeyedService,
base::WeakPtrFactory<ExtensionStorageMonitor> weak_ptr_factory_;
- friend class StorageEventObserver;
+ friend class SingleExtensionStorageObserver;
friend class ExtensionStorageMonitorTest;
DISALLOW_COPY_AND_ASSIGN(ExtensionStorageMonitor);
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_storage_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698