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

Unified Diff: chrome/browser/extensions/api/declarative/rules_registry_storage_delegate.h

Issue 10695130: Fix a memory leak in RulesRegistryStorageDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/extensions/api/declarative/rules_registry_storage_delegate.h
diff --git a/chrome/browser/extensions/api/declarative/rules_registry_storage_delegate.h b/chrome/browser/extensions/api/declarative/rules_registry_storage_delegate.h
index 063d641409199f00f186f2724b463c45ba867c6a..a69d599ba1400615c0a41440db13f1803850a843 100644
--- a/chrome/browser/extensions/api/declarative/rules_registry_storage_delegate.h
+++ b/chrome/browser/extensions/api/declarative/rules_registry_storage_delegate.h
@@ -17,7 +17,7 @@ class Profile;
namespace extensions {
// A Delegate to the RulesRegistryWithCache which handles reading/writing rules
-// to the extension state store. This class should be initialized on the UI
+// to the extension state store. This class should be (de)initialized on the UI
// thread, but used on the RulesRegistry thread.
class RulesRegistryStorageDelegate : public RulesRegistryWithCache::Delegate {
public:
@@ -25,9 +25,10 @@ class RulesRegistryStorageDelegate : public RulesRegistryWithCache::Delegate {
virtual ~RulesRegistryStorageDelegate();
// Called on the UI thread to initialize the delegate.
- void Init(Profile* profile,
- RulesRegistryWithCache* rules_registry,
- const std::string& storage_key);
+ void InitOnUIThread(Profile* profile,
+ RulesRegistryWithCache* rules_registry,
+ const std::string& storage_key);
+ void CleanupOnUIThread();
// RulesRegistryWithCache::Delegate
virtual bool IsReady() OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698