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

Unified Diff: chrome/browser/extensions/settings/settings_leveldb_storage.h

Issue 8497065: Extension Settings API: make it so that when leveldb storage areas fail to be (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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/settings/settings_leveldb_storage.h
diff --git a/chrome/browser/extensions/settings/settings_leveldb_storage.h b/chrome/browser/extensions/settings/settings_leveldb_storage.h
index 95b0e12abf445ba6ed2995361acdcb9d6f582992..7c3abe44faf3d218ca5653e3ff0d3446c1189a86 100644
--- a/chrome/browser/extensions/settings/settings_leveldb_storage.h
+++ b/chrome/browser/extensions/settings/settings_leveldb_storage.h
@@ -14,21 +14,31 @@
#include "base/memory/scoped_ptr.h"
#include "base/task.h"
#include "chrome/browser/extensions/settings/settings_storage.h"
+#include "chrome/browser/extensions/settings/settings_storage_factory.h"
#include "third_party/leveldatabase/src/include/leveldb/db.h"
-// Extension settings storage object, backed by a leveldb database.
-//
namespace extensions {
+// Extension settings storage object, backed by a leveldb database.
+//
// No caching is done; that should be handled by wrapping with an
// SettingsStorageCache.
// All methods must be run on the FILE thread.
class SettingsLeveldbStorage : public SettingsStorage {
public:
- // Tries to create a leveldb storage area for an extension at a base path.
- // Returns NULL if creation fails.
- static SettingsLeveldbStorage* Create(
- const FilePath& base_path, const std::string& extension_id);
+ // Factory for creating SettingsLeveldbStorage instances.
+ class Factory : public SettingsStorageFactory {
+ public:
+ Factory() {}
+ virtual ~Factory() {}
+
+ // SettingsStorageFactory implementation.
+ virtual SettingsStorage* Create(
+ const FilePath& base_path, const std::string& extension_id) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Factory);
+ };
// Must be deleted on the FILE thread.
virtual ~SettingsLeveldbStorage();

Powered by Google App Engine
This is Rietveld 408576698