Index: chrome/browser/extensions/settings/settings_storage_factory.h |
diff --git a/chrome/browser/extensions/settings/settings_storage_factory.h b/chrome/browser/extensions/settings/settings_storage_factory.h |
index b39f45f6a1e9a04fe0daf6c7d23e70ce0a0d3780..411d96efa815c32dd55c11d6c4c429717e92ae32 100644 |
--- a/chrome/browser/extensions/settings/settings_storage_factory.h |
+++ b/chrome/browser/extensions/settings/settings_storage_factory.h |
@@ -6,21 +6,30 @@ |
#define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_STORAGE_FACTORY_H_ |
#pragma once |
-class FilePath; |
+#include <string> |
+ |
+#include "base/file_path.h" |
+#include "base/memory/ref_counted.h" |
namespace extensions { |
class SettingsStorage; |
// Factory for creating SettingStorage instances. |
-class SettingsStorageFactory { |
+// |
+// Refcouted because it's just too messy to distribute these objects between |
+// SettingsBackend instances any other way. |
+class SettingsStorageFactory |
+ : public base::RefCountedThreadSafe<SettingsStorageFactory> { |
public: |
- virtual ~SettingsStorageFactory() {} |
- |
- // Create a new SettingsLeveldbStorage area. Return NULL to indicate |
- // failure. Must be called on the FILE thread. |
+ // Creates a new SettingsStorage area for an extension under |base_path|. |
+ // Return NULL to indicate failure. Must be called on the FILE thread. |
virtual SettingsStorage* Create( |
const FilePath& base_path, const std::string& extension_id) = 0; |
+ |
+ protected: |
+ friend class base::RefCountedThreadSafe<SettingsStorageFactory>; |
+ virtual ~SettingsStorageFactory() {} |
}; |
} // namespace extensions |